@hcl-software/domino-rest-sdk-node
    Preparing search index...

    Interface DominoRestAccess

    DominoRestAccess to provide JWT Access Tokens to the REST menthods. Might use an authentication method like Basic or OAuth.

    interface DominoRestAccess {
        accessToken: (
            callback?: () => Promise<AccessTokenReturn>,
        ) => Promise<string>;
        baseUrl: string;
        clone: (alternateScope: string) => DominoAccess;
        credentials: RestCredentials;
        expiry: () => null | number;
        expiryTime?: number;
        scope: () => null | string;
        token?: string;
        updateCredentials: (credentials: RestCredentials) => RestCredentials;
    }

    Implemented by

    Index

    Properties

    accessToken: (callback?: () => Promise<AccessTokenReturn>) => Promise<string>

    Fetches a JWT token from Domino REST API url if there is no current token or current token is expired.

    Type declaration

      • (callback?: () => Promise<AccessTokenReturn>): Promise<string>
      • Parameters

        Returns Promise<string>

        a promise the resolves the JWT token for access.

    baseUrl: string

    Base URL of the Idp: Domino REST API, Active Directory, Keycloak, Octa, etc.

    clone: (alternateScope: string) => DominoAccess

    Creates a clone of current DominoAccess with the given alternate scope.

    Type declaration

      • (alternateScope: string): DominoAccess
      • Parameters

        • alternateScope: string

          the alternate scope the clone DominoAccess will have.

        Returns DominoAccess

        a clone of current DominoAccess that has the alternate scope.

    credentials: RestCredentials

    Holds all the credentials needed to access the Domino REST API server.

    expiry: () => null | number

    Get JWT token (if any) expiry.

    Type declaration

      • (): null | number
      • Returns null | number

        the expiry time of token in seconds or null if there is no expiry time yet.

    expiryTime?: number

    Expiry time of JWT token in seconds.

    scope: () => null | string

    Get current credentials given scope.

    Type declaration

      • (): null | string
      • Returns null | string

        the scope of given credentials or null of no scope is given.

    token?: string

    The JWT token for access.

    updateCredentials: (credentials: RestCredentials) => RestCredentials

    Updates current credentials using the given new credentials.

    Type declaration

    an error if credential type is BASIC, and no username or password is given.

    an error if credentual type is OAUTH, and no appSecret, appId, or refreshToken is given.