Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "node_modules/@bity/oauth2-auth-code-pkce/index"

Index

Type aliases

HttpClient

HttpClient: (...args: any[]) => Promise<any>

Type declaration

    • (...args: any[]): Promise<any>
    • Parameters

      • Rest ...args: any[]

      Returns Promise<any>

Scopes

Scopes: string[]

URL

URL: string

Variables

Const HEADER_AUTHORIZATION

HEADER_AUTHORIZATION: "Authorization" = "Authorization"

HTTP headers that we need to access.

Const HEADER_WWW_AUTHENTICATE

HEADER_WWW_AUTHENTICATE: "WWW-Authenticate" = "WWW-Authenticate"

Const LOCALSTORAGE_ID

LOCALSTORAGE_ID: "oauth2authcodepkce" = `oauth2authcodepkce`

To store the OAuth client's data between websites due to redirection.

Const LOCALSTORAGE_STATE

LOCALSTORAGE_STATE: string = `${LOCALSTORAGE_ID}-state`

Const PKCE_CHARSET

PKCE_CHARSET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~" = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"

Character set to generate code verifier defined in rfc7636.

Const RECOMMENDED_CODE_VERIFIER_LENGTH

RECOMMENDED_CODE_VERIFIER_LENGTH: 96 = 96

The maximum length for a code verifier for the best security we can offer. Please note the NOTE section of RFC 7636 ยง 4.1 - the length must be >= 43, but <= 128, after base64 url encoding. This means 32 code verifier bytes encoded will be 43 bytes, or 96 bytes encoded will be 128 bytes. So 96 bytes is the highest valid value that can be used.

Const RECOMMENDED_STATE_LENGTH

RECOMMENDED_STATE_LENGTH: 32 = 32

A sensible length for the state's length, for anti-csrf.

Functions

fromWWWAuthenticateHeaderStringToObject

  • A convience function to turn, for example, Bearer realm="bity.com", error="invalid_client" into { realm: "bity.com", error: "invalid_client" }.

    Parameters

    • a: string

    Returns ErrorWWWAuthenticate

toErrorClass

  • Translate the raw error strings returned from the server into error classes.

    Parameters

    • rawError: string

    Returns ErrorOAuth2

Object literals

Const RawErrorToErrorClassMap

RawErrorToErrorClassMap: object

access_denied

access_denied: ErrorAccessDenied = ErrorAccessDenied

invalid_client

invalid_client: ErrorInvalidClient = ErrorInvalidClient

invalid_grant

invalid_grant: ErrorInvalidGrant = ErrorInvalidGrant

invalid_json

invalid_json: ErrorInvalidJson = ErrorInvalidJson

invalid_request

invalid_request: ErrorInvalidRequest = ErrorInvalidRequest

invalid_scope

invalid_scope: ErrorInvalidScope = ErrorInvalidScope

invalid_token

invalid_token: ErrorInvalidToken = ErrorInvalidToken

server_error

server_error: ErrorServerError = ErrorServerError

temporarily_unavailable

temporarily_unavailable: ErrorTemporarilyUnavailable = ErrorTemporarilyUnavailable

unauthorized_client

unauthorized_client: ErrorUnauthorizedClient = ErrorUnauthorizedClient

unsupported_grant_type

unsupported_grant_type: ErrorUnsupportedGrantType = ErrorUnsupportedGrantType

unsupported_response_type

unsupported_response_type: ErrorUnsupportedResponseType = ErrorUnsupportedResponseType

Generated using TypeDoc