Options
All
  • Public
  • Public/Protected
  • All
Menu

Adapts HTTP client to common objects like Request and Response.

It supports performing requests to ServerConfiguration endpoints, like login and logout, but also supports performing authenticated requests throw request method.

It can setup RequestInterceptor and ResponseInterceptor to automate the authentication on the underlying client.

Implementation of this interface can be given to Auth constructor.

Type parameters

  • R = any

    Client response type

Hierarchy

  • ClientAdapter

Implemented by

Index

Methods

asResponse

  • asResponse(clientResponse: R): Response

login

  • login(request: Request): Promise<R>
  • Convert an authorization server login Request to a client promise that will perform it.

    Parameters

    Returns Promise<R>

logout

  • logout(request: Request): Promise<R>
  • Convert an authorization server logout Request to a client promise that will perform it.

    Parameters

    Returns Promise<R>

renew

  • renew(request: Request): Promise<R>
  • Convert an authorization server renew Request to a client promise that will perform it.

    Parameters

    Returns Promise<R>

request

  • request(request: Request): Promise<R>

setupErrorResponseInterceptor

  • Setup a response interceptor that intercept all responses on the underlying client to automate authentication of each requests.

    Parameters

    Returns () => void

      • (): void
      • Returns void

setupRequestInterceptor

  • Setup a request interceptor that intercept all requests on the underlying client to automate authentication of each requests.

    Parameters

    Returns () => void

      • (): void
      • Returns void

Legend

  • Function
  • Function with type parameter
  • Type alias
  • Interface
  • Interface with type parameter
  • Method
  • Class
  • Class with type parameter

Generated using TypeDoc