Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

Client connects to the Cipherise server to facilitate interaction with it.

export
class

Client

Hierarchy

  • Client

Index

Constructors

constructor

  • new Client(url: string, logger?: ILogger, validateServerVersion?: boolean): Client
  • Creates a Client to connect to the given Cipherise server.

    memberof

    Client

    Parameters

    • url: string

      The URL of the Cipherise server to connect to.

    • Optional logger: ILogger

      The logger to output messages to.

    • Default value validateServerVersion: boolean = true

      Whether to validate the version of the server.

    Returns Client

Methods

createService

  • createService(serviceName: string): Promise<Service>
  • Creates a new service provider. The new Service is used to enrol and authenticate users.

    memberof

    Client

    Parameters

    • serviceName: string

      The display name for this service provider.

    Returns Promise<Service>

deserializeService

  • deserializeService(data: Buffer): Service

deserializeServiceAsync

  • deserializeServiceAsync(data: Buffer): Promise<Service>
  • Deserializes the buffer into a Service.

    memberof

    Client

    Parameters

    • data: Buffer

      The buffer to deserialize.

    Returns Promise<Service>

getPayloadSize

  • getPayloadSize(): Promise<number>
  • Returns Promise<number>

serverInformation

  • Retrieves information about the Cipherise server. Note that the minimum Cipherise server version is 6.0.0.

    memberof

    Client

    Returns Promise<ServerInformation>

Generated using TypeDoc