Member Junction
    Preparing search index...

    A registered way of opening a session against a kind of source.

    @RegisterClass(BaseAccessDriver, 'OAuthClientCredentials')
    export class OAuthAccessDriver extends BaseAccessDriver {
    public readonly Key = 'OAuthClientCredentials';
    public async Connect(request: AccessRequest): Promise<AccessArtifact> {
    const token = await exchange(request.Secret, request.Parameters.TokenURL);
    return { Headers: { Authorization: `Bearer ${token.access_token}` }, ExpiresAt: token.expires };
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Key: "IT-ContentPipelineAccess" = ACCESS_DRIVER_KEY

    The registration key. Must match the key passed to @RegisterClass.

    Methods

    • Check that a session can be opened, without running anything.

      The default performs the real connect and reports what happened, which is the honest test: a driver that would fail at run time fails here for the same reason. A driver with a cheaper liveness check may override.

      Parameters

      Returns Promise<AccessProbeResult>

    • Resolve a registered driver by key, returning null rather than a hollow base instance.

      Parameters

      • key: string

      Returns BaseAccessDriver | null