api/jwt: remove redundant exports
This commit is contained in:
parent
ebd1104df3
commit
de5162e417
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ const makeHmac = (header, payload) =>
|
|||
.update(`${header}.${payload}`)
|
||||
.digest("base64url");
|
||||
|
||||
export const generate = () => {
|
||||
const generate = () => {
|
||||
const exp = Math.floor(new Date().getTime() / 1000) + env.jwtLifetime;
|
||||
|
||||
const header = toBase64URL(JSON.stringify({
|
||||
|
@ -32,7 +32,7 @@ export const generate = () => {
|
|||
};
|
||||
}
|
||||
|
||||
export const verify = (jwt) => {
|
||||
const verify = (jwt) => {
|
||||
const [header, payload, signature] = jwt.split(".", 3);
|
||||
const timestamp = Math.floor(new Date().getTime() / 1000);
|
||||
|
||||
|
|
Loading…
Reference in a new issue