elections-cpl.api.hscc.bdpa.org • Docs
elections-cpl.api.hscc.bdpa.org / lib/next-auth/token / deriveSchemeAndToken
deriveSchemeAndToken(
__namedParameters
):Promise
<BearerToken
>
Derives a token and scheme from an authentication string (such as an Authorization header). Does not check the database for token existence. Throws on invalid/missing authentication string.
Throws InvalidSecretError if invalid/missing data is provided.
• __namedParameters
• __namedParameters.allowedSchemes?: "bearer"
| "bearer"
[]
Accepted authentication schemes. By default, all schemes are accepted.
• __namedParameters.authString?: string
The authentication string used to derive a token and scheme.
Promise
<BearerToken
>
deriveSchemeAndToken(
__namedParameters
):Promise
<BearerToken
>
Returns the token and scheme passed via authData
if the token and scheme
are valid. Does not check the database for token existence. Throws on
invalid/missing token/scheme.
• __namedParameters
• __namedParameters.allowedSchemes?: "bearer"
| "bearer"
[]
Accepted authentication schemes. By default, all schemes are accepted.
• __namedParameters.authData?: Partial
<object
>
The data that will be verified and returned as-is.
Promise
<BearerToken
>