Logo DataHubClient

Authentication Type

A DataHub credential, reduced to the single HTTP header it contributes to a request, or anonymous access without an authentication header. Construct one via the static factory methods rather than directly. See the .

Instance members

Instance member Description

this.Header

Full Usage: this.Header

Returns: string

The HTTP header name carrying the credential, or an empty string for anonymous access.

Returns: string

this.Value

Full Usage: this.Value

Returns: string

The HTTP header value carrying the credential, or an empty string for anonymous access.

Returns: string

Static members

Static member Description

Authentication.Anonymous()

Full Usage: Authentication.Anonymous()

Returns: Authentication An anonymous credential with empty Header and Value properties.

Accesses public resources without sending an authentication header.

Returns: Authentication

An anonymous credential with empty Header and Value properties.

Authentication.JobToken(token)

Full Usage: Authentication.JobToken(token)

Parameters:
    token : string - The CI/CD job token.

Returns: Authentication

Authenticates with a CI/CD job token via the JOB-TOKEN header.

token : string

The CI/CD job token.

Returns: Authentication

Authentication.OAuthToken(token)

Full Usage: Authentication.OAuthToken(token)

Parameters:
    token : string - The OAuth 2.0 access token.

Returns: Authentication

Authenticates with an OAuth 2.0 token via the Authorization: Bearer header.

token : string

The OAuth 2.0 access token.

Returns: Authentication

Authentication.PersonalAccessToken(token)

Full Usage: Authentication.PersonalAccessToken(token)

Parameters:
    token : string - The personal access token.

Returns: Authentication

Authenticates with a Personal Access Token via the PRIVATE-TOKEN header.

token : string

The personal access token.

Returns: Authentication

Type something to start searching.