Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Service

Service represents a service provider on the Cipherise server.

export
class

Service

Hierarchy

  • Service

Index

Properties

id

id: string

Methods

PushAuth

  • PushAuth(username: string, device: Device, authenticationMessage: string, brandingMessage: string, notificationMessage: string, authLevel: AuthenticationLevel): Promise<PushAuth>
  • Starts a PushAuth for the given user.

    memberof

    Service

    Parameters

    • username: string

      The username to authenticate.

    • device: Device

      The device to authenticate against. A list of devices can be retrieved from getUserDevices.

    • authenticationMessage: string

      The message to display at the top of the authentication screen.

    • brandingMessage: string

      The message to display at the bottom of the authentication screen.

    • notificationMessage: string

      The message to display in the push notification to the device.

    • authLevel: AuthenticationLevel

      The authentication level to use.

    Returns Promise<PushAuth>

WaveAuth

  • Starts a WaveAuth.

    memberof

    Service

    Parameters

    • authenticationMessage: string

      The message to display at the top of the authentication screen.

    • brandingMessage: string

      The message to display at the bottom of the authentication screen.

    • authLevel: AuthenticationLevel

      The authentication level to use.

    Returns Promise<WaveAuth>

deserializeEnrolment

  • deserializeEnrolment(data: Buffer): Enrolment
  • Deserializes the buffer into an enrolment session.

    memberof

    Service

    Parameters

    • data: Buffer

      The buffer to deserialize.

    Returns Enrolment

deserializePushAuth

  • deserializePushAuth(data: Buffer): PushAuth
  • Deserializes the buffer into a PushAuth session.

    memberof

    Service

    Parameters

    • data: Buffer

      The buffer to deserialize.

    Returns PushAuth

deserializeWaveAuth

  • deserializeWaveAuth(data: Buffer): WaveAuth
  • Deserializes the buffer into a WaveAuth session.

    memberof

    Service

    Parameters

    • data: Buffer

      The buffer to deserialize.

    Returns WaveAuth

enrolUser

  • enrolUser(username: string): Promise<Enrolment>
  • Starts a Cipherise enrolment for the given user.

    memberof

    Service

    Parameters

    • username: string

      The username to enrol.

    Returns Promise<Enrolment>

equals

  • Compares two services for equality.

    memberof

    Service

    Parameters

    • b: Service

      The service to compare against.

    Returns boolean

getUserDevices

  • getUserDevices(username: string): Promise<Device[]>
  • Returns a list of devices associated with the given user. Will return an empty list if the user has not enrolled.

    memberof

    Service

    Parameters

    • username: string

      The username to find devices for.

    Returns Promise<Device[]>

revoke

  • revoke(): Promise<boolean>
  • Revokes this service, so that it cannot be used for any further operations. To reactivate this service, re-enrol it.

    memberof

    Service

    Returns Promise<boolean>

revokeUser

  • revokeUser(username: string, devices?: Device[]): Promise<void>
  • Revokes a user from the service.

    memberof

    Service

    Parameters

    • username: string

      The username to revoke.

    • Optional devices: Device[]

      The devices to revoke. Optional.

    Returns Promise<void>

serialize

  • serialize(): Buffer
  • Serializes this service to a buffer.

    memberof

    Service

    Returns Buffer

userEnrolled

  • userEnrolled(username: string): Promise<boolean>
  • Returns whether or not the given user has enrolled to this service.

    memberof

    Service

    Parameters

    • username: string

      The username to check enrolment for.

    Returns Promise<boolean>

Generated using TypeDoc