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.
Zaimki/server/authenticate.js

10 lines
226 B
JavaScript

import jwt from './jwt';
export default ({headers: { authorization }}) => {
if (!authorization || !authorization.startsWith('Bearer ')) {
return null;
}
return jwt.validate(authorization.substring(7));
}