BasicAuthenticationCredentials class

A simple <xref:ServiceClientCredential> that authenticates with a username and a password.

Constructors

BasicAuthenticationCredentials(string, string, string)

Creates a new BasicAuthenticationCredentials object.

Properties

authorizationScheme

Authorization scheme. Defaults to "Basic". More information about authorization schemes is available here: https://developer.mozilla.org/docs/Web/HTTP/Authentication#authentication_schemes

password

Password

userName

Username

Methods

signRequest(WebResourceLike)

Signs a request with the Authentication header.

Constructor Details

BasicAuthenticationCredentials(string, string, string)

Creates a new BasicAuthenticationCredentials object.

new BasicAuthenticationCredentials(userName: string, password: string, authorizationScheme?: string)

Parameters

userName

string

User name.

password

string

Password.

authorizationScheme

string

The authorization scheme.

Property Details

authorizationScheme

Authorization scheme. Defaults to "Basic". More information about authorization schemes is available here: https://developer.mozilla.org/docs/Web/HTTP/Authentication#authentication_schemes

authorizationScheme: string

Property Value

string

password

Password

password: string

Property Value

string

userName

Username

userName: string

Property Value

string

Method Details

signRequest(WebResourceLike)

Signs a request with the Authentication header.

function signRequest(webResource: WebResourceLike): Promise<WebResourceLike>

Parameters

webResource
WebResourceLike

The WebResourceLike to be signed.

Returns

Promise<WebResourceLike>

The signed request object.