AbstractAuthentication class

Definition

Abstract parent class for all authentication classes in Azure Machine Learning.

Derived classes provide different means to authenticate and acquire a token based on their targeted use case. For examples of authentication, see https://aka.ms/aml-notebook-auth.

AbstractAuthentication(cloud=None)
Inheritance
builtins.object
AbstractAuthentication

Parameters

cloud
str

The name of the target cloud. Can be one of "AzureCloud", "AzureChinaCloud", or "AzureUSGovernment". If no cloud is specified, any configured default from the Azure CLI is used. If no default is found, "AzureCloud" is used.

Methods

get_authentication_header()

Return the HTTP authorization header.

The authorization header contains the user access token for access authorization against the service.

signed_session(session=None)

Add the authorization header as a persisted header on an HTTP session.

Any new requests sent by the session will contain the authorization header.

get_authentication_header()

Return the HTTP authorization header.

The authorization header contains the user access token for access authorization against the service.

get_authentication_header()

Returns

Returns the HTTP authorization header.

Return type

signed_session(session=None)

Add the authorization header as a persisted header on an HTTP session.

Any new requests sent by the session will contain the authorization header.

signed_session(session=None)

Parameters

session
requests.session

The HTTP session that will have the authorization header as a default persisted header. When None, a new session is created.

default value: None

Returns

Returns the HTTP session after the update.

Return type

requests.session