You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-csc-ui/src/auth.js

32 lines
512 B

import {
getLocal,
setLocal,
deleteLocal
} from 'src/storage'
export function getJwt () {
return getLocal('jwt')
}
export function hasJwt () {
return getJwt() !== null
}
export function setJwt (jwt) {
setLocal('jwt', jwt)
}
export function deleteJwt () {
deleteLocal('jwt')
deleteLocal('subscriberId')
}
export function setSubscriberId (subscriberId) {
setLocal('subscriberId', subscriberId)
}
export function getSubscriberId () {
return getLocal('subscriberId')
}