Interface SudoProfilesClient

Interface encapsulating a library of functions for calling Sudo service and managing Sudos.

Hierarchy

  • SudoProfilesClient

Implemented by

Methods

  • Creates a new Sudo

    Parameters

    • sudo: Sudo

      Sudo to create.

    Returns Promise<Sudo>

    Sudo: The new Sudo

    Throws

    IllegalStateError

    Throws

    InsufficientEntitlementsError

    Throws

    ServiceError

    Throws

    UnknownGraphQLError

    Throws

    FatalError

  • Deletes a Sudo.

    Parameters

    • sudo: Sudo

      Sudo to delete.

    Returns Promise<void>

    void

    Throws

    IllegalArgumentError

    Throws

    FatalError

    Throws

    SudoNotFoundError

  • Retrieves a signed ownership proof for the specified owner. The ownership proof JWT has the following payload. { "jti": "DBEEF4EB-F84A-4AB7-A45E-02B05B93F5A3", "owner": "cd73a478-23bd-4c70-8c2b-1403e2085845", "iss": "sudoplatform.sudoservice", "aud": "sudoplatform.virtualcardservice", "exp": 1578986266, "sub": "da17f346-cf49-4db4-98c2-862f85515fc4", "iat": 1578982666 }

    "owner" is an unique ID of an identity managed by the issuing serivce. In case of Sudo service this represents unique reference to a Sudo. "sub" is the subject to which this proof is issued, i.e. the user. "aud" is the target audience of the proof.

    Parameters

    • sudoId: string

      Sudo Id to generated an ownership proof for.

    • audience: string

      target audience for this proof.

    Returns Promise<string>

    String: The JWT

    Throws

    ServiceError

    Throws

    UnknownGraphQLError

    Throws

    FatalError

  • Retrieves all Sudos owned by the signed in user.

    Parameters

    Returns Promise<Sudo[]>

    Sudo[]: An array of Sudos

    Throws

    DownloadError

    Throws

    ServiceError

    Throws

    UnknownGraphQLError

    Throws

    FatalError

  • Adds a key value pair to the store (keyId, key), then sets that keyId as the pointer to the current symmetric key to use.

    As symmetric keys can be rotated, this will also allow a list of symmetric keys to exist in the store in which to decrypt older sudo claims with if needed and also give the ability to set the current symmetric key.

    The last symmetric key pushed will be set to the current active symmetric key.

    Parameters

    • keyId: string

      The keyId that points to the symmetric key used for encrypting claims

    • key: string

      The symmetric key to encrypt claims with

    Returns Promise<void>

  • Reset any internal state and cached content.

    Returns Promise<void>

  • Subscribes to be notified of new, updated or deleted Sudos. Blob data is not downloaded automatically so the caller is expected to use listSudos API if they need to access any associated blobs.

    Parameters

    • id: string

      unique ID for the subscriber.

    • changeType: ChangeType

      change type to subscribe to.

    • subscriber: SudoSubscriber

      subscriber to notify.

    Returns void

    Throws

    NotSignedInError

  • Subscribes to be notified of new, updated and deleted Sudos. Blob data is not downloaded automatically so the caller is expected to use listSudos API if they need to access any associated blobs.

    Parameters

    • id: string

      unique ID for the subscriber.

    • subscriber: SudoSubscriber

      subscriber to notify.

    Returns void

    Throws

    NotSignedInError

  • Unsubscribes the specified subscriber so that it no longer receives notifications about new, updated or deleted Sudos.

    Parameters

    • id: string

      unique ID for the subscriber.

    • changeType: ChangeType

      change type to unsubscribe from.

    Returns void

  • Unsubscribe all subscribers from receiving notifications about new, updated or deleted Sudos.

    Returns void

  • Updates a Sudo.

    Parameters

    • sudo: Sudo

      Sudo to update.

    • keyId: string

      new claims keyId

    Returns Promise<Sudo>

    Sudo: The updated Sudo

    Throws

    IllegalArgumentException

    Throws

    IllegalStateError

    Throws

    VersionMismatchError

    Throws

    UploadError

    Throws

    ServiceError

    Throws

    UnknownGraphQLError

    Throws

    FatalError

Generated using TypeDoc