class TokenHandler {constructor(getter: IAuthUserInfoGetter)getAccessToken = async (): Promise<string>;getDecodedToken = async (): Promise<DecodedAccessToken>;getPermissions = async (): Promise<CustomerPermission[]>;getStatus = async (): Promise<Status>;invalidate = () => void;}
none
getAccessToken: Promise<string> | promise that should resolve to the accessToken (string ) |
getDecodedToken: Promise<DecodedAccessToken> | promise that should resolve to the DecodedAccessToken |
getPermissions: Promise<CustomerPermission[]> | promise that should resolve to CustomerPermission[] |
getStatus: Promise<Status> | promise that should resolve to the Status |
invalidate(): () => void | A function to invalidate the token & put it into status: 'unauthenticated' state. Call this function when a non-expired accessToken was rejected with a 401, usually done inside of the ApolloClient . This typically happens when the authenticated user's session has ended. |