Type alias ApiAuthenticationConfig

ApiAuthenticationConfig: {
    authServer?: string;
    clientId: string;
    clientSecret: string;
    tokenCache?: TokenCache;
    type: "client-credentials";
} | {
    authServer?: string;
    callback: string;
    clientId: string;
    tokenCache?: TokenCache;
    type: "pkce";
}

Authentication configuration for an API.

Type declaration

  • Optional authServer?: string

    URL to the authentication server to use.

    Default

    https://login.spinque.com/
    
  • clientId: string
  • clientSecret: string
  • Optional tokenCache?: TokenCache

    Implementation of a TokenCache. Defines a get and set method that put the token in some sort of storage. This is especially useful during development, when in-memory caching doesn't work due to frequent server restarts.

  • type: "client-credentials"

    OAuth 2.0 Client Credentials flow. Uses Client ID and Client Secret to directly request an access token.

Type declaration

  • Optional authServer?: string

    URL to the authentication server to use.

    Default

    https://login.spinque.com/
    
  • callback: string
  • clientId: string
  • Optional tokenCache?: TokenCache

    Implementation of a TokenCache. Defines a get and set method that put the token in some sort of storage. This is especially useful during development, when in-memory caching doesn't work due to frequent server restarts.

  • type: "pkce"

    OAuth 2.0 PKCE flow.

Generated using TypeDoc