Authorization provider used to to authorize operations using Oracle Cloud Infrastructure Identity and Access Management (IAM).

The driver uses this class internally for authorization with the Cloud Service. Normally, you do not need to use this class. Instead, create NoSQLClient instance by specifying iam property in AuthConfig as part of auth, as described in IAMConfig.

You may use this class as an alternative to specifying iam, as this may allow additional operations, e.g. retrieving resource principal claim information. Use this class as a value for provider property when creating NoSQLClient instance. This is shown in the example.

See

Example

Using IAMAuthorizationProvider when creating NoSQLClient instance.

const client = new NoSQLClient({
region: Region.US_PHOENIX_1,
compartment: "ocid1.compartment.oc1.............................",
auth: {
provider: new IAMAuthorizationProvider({
configFile: "~/myapp/.oci/config",
profileName: "Jane"
})
}
});

Hierarchy

  • IAMAuthorizationProvider

Implements

Constructors

Methods

  • If using Resource Principal, gets the claims information in the resource principal session token (RPST) such as the resource tenant and compartment OCIDs.

    Async

    Returns

    If using Resource Principal, promise of ResourcePrincipalClaims containing RPST claim information, otherwise promise of undefined.

    Returns Promise<undefined | ResourcePrincipalClaims>

  • Overload

    A convenience method to create new instance of IAMAuthorizationProvider for session token-based authentication using default OCI configuration file and specified or default profile name.

    Other applicable properties are initialized to their defaults as described in IAMConfig.

    Returns

    New instance of IAMAuthorizationProvider using session token-based authentication

    See

    Parameters

    • Optional profileName: string

      Optional profile name in the default OCI configuration file. Defaults to value "DEFAULT"

    Returns IAMAuthorizationProvider

  • Overload

    A convenience method to create new instance of IAMAuthorizationProvider for session token-based authentication using specified OCI configuration file and profile name.

    Other applicable properties are initialized to their defaults as described in IAMConfig.

    Returns

    New instance of IAMAuthorizationProvider using session token-based authentication

    See

    Parameters

    • configFile: string

      OCI configuration file path. See configFile

    • Optional profileName: string

      Optional profile name in the default OCI configuration file. Defaults to value "DEFAULT"

    Returns IAMAuthorizationProvider

Generated using TypeDoc