mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00:00
api/jwt: remove redundant exports
This commit is contained in:
parent
ebd1104df3
commit
de5162e417
|
@ -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