Interface ArnAuthService

ARN Client authentication service.

Hierarchy

  • ArnAuthService

Implemented by

Properties

config: ArnValidAuthConfig
currentContext: undefined | ArnAuthContext
currentContext$: Observable<undefined | ArnAuthContext>

The state of the current authentication context.

emitter: EventEmitter<string | symbol, any>
status$: Observable<undefined | ArnAuthStatus>

Methods

  • Connect the user using the provided authentication configuration. Returns the authentication context after the connection is established or throw an error otherwise.

    Returns

    The authentication context.

    Parameters

    • Optional params: {
          assignCurrentContext?: boolean;
          authConfig?: ArnValidAuthConfig;
          resolveContextStep?: ArnAuthContextResolveStep;
      }

      The authentication configuration.

      • Optional assignCurrentContext?: boolean
      • Optional authConfig?: ArnValidAuthConfig
      • Optional resolveContextStep?: ArnAuthContextResolveStep

    Returns Promise<ArnAuthContext>

  • Connect using an Arianee Access Token (AAT).

    Returns

    The relevant AAT.

    Parameters

    • aat: string

      The string serialization of the AAT.

    Returns ArnToken

  • Produces an Authorization header to authenticate the connected user in a request to the server.

    Throws

    If no user is connected on the provided/default context.

    Parameters

    • Optional context: ArnAuthContext

      The authentication context to produce the header for, or the latest one by default.

    Returns string

  • Sign a jwt with a given key.

    Parameters

    • jwt: JWT

      The JWT to sign.

    • keyName: string

      The symbolic name of the key, to be found in the ARN project auth configuration.

    • Optional tokenId: string

      The id of the token to use for signing (if the key is restricted token owners of a specific contract).

    Returns Promise<string>

Generated using TypeDoc