Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Adapter

Implemented by

Index

Properties

Environment-specific options

security: { digestSha256: any; generatePKCEChallenge: any; importJWK: any; randomBytes: any; signCompactJws: any }

Type declaration

  • digestSha256:function
    • digestSha256(payload: string): Promise<Uint8Array>
  • generatePKCEChallenge:function
    • generatePKCEChallenge(entropy?: number): Promise<{ codeChallenge: string; codeVerifier: string }>
    • Parameters

      • Optional entropy: number

      Returns Promise<{ codeChallenge: string; codeVerifier: string }>

  • importJWK:function
    • importJWK(jwk: JWK): Promise<CryptoKey>
  • randomBytes:function
    • randomBytes(count: number): Uint8Array
  • signCompactJws:function
    • signCompactJws(alg: "ES384" | "RS384", privateKey: CryptoKey, header: any, payload: any): Promise<string>
    • Parameters

      • alg: "ES384" | "RS384"
      • privateKey: CryptoKey
      • header: any
      • payload: any

      Returns Promise<string>

Methods

  • atob(str: string): string
  • base64urldecode(input: string): string
  • Base64Url to ASCII string

    Parameters

    • input: string

    Returns string

  • base64urlencode(input: string | Uint8Array): string
  • ASCII string or Uint8Array to Base64URL

    Parameters

    • input: string | Uint8Array

    Returns string

  • btoa(str: string): string
  • getAbortController(): { prototype: AbortController }
  • Returns a reference to the AbortController class

    Returns { prototype: AbortController }

    • prototype: AbortController
  • Creates and returns adapter-aware SMART api. Not that while the shape of the returned object is well known, the arguments to this function are not. Those who override this method are free to require any environment-specific arguments. For example in node we will need a request, a response and optionally a storage or storage factory function.

    Returns SMART

  • getUrl(): URL
  • Given the current environment, this method returns the current url as URL instance

    Returns URL

  • redirect(to: string): void | Promise<any>
  • Given the current environment, this method must redirect to the given path

    Parameters

    • to: string

    Returns void | Promise<any>

  • relative(path: string): string
  • Given a relative path, compute and return the full url, assuming that it is relative to the current location

    Parameters

    • path: string

      The path to convert to absolute

    Returns string

Generated using TypeDoc