This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
|
import jwt from './jwt';
|
|
|
|
export default ({headers: { authorization }}) => {
|
|
if (!authorization || !authorization.startsWith('Bearer ')) {
|
|
return null;
|
|
}
|
|
|
|
return jwt.validate(authorization.substring(7));
|
|
}
|