C# Class Microsoft.Identity.Client.AuthenticationParameters

Contains authentication parameters based on unauthorized response from resource server.
ファイルを表示 Open project: AzureAD/microsoft-authentication-library-for-dotnet Class Usage Examples

Public Methods

Method Description
CreateFromResourceUrlAsync ( Uri resourceUrl ) : Task

Creates authentication parameters from address of the resource. This method expects the resource server to return unauthorized response with WWW-Authenticate header containing authentication parameters.

CreateFromResponseAuthenticateHeader ( string authenticateHeader ) : AuthenticationParameters

Creates authentication parameters from the WWW-Authenticate header in response received from resource. This method expects the header to contain authentication parameters.

CreateFromUnauthorizedResponseAsync ( HttpResponseMessage responseMessage ) : Task

Creates authentication parameters from the response received from the response received from the resource. This method expects the response to have unauthorized status and WWW-Authenticate header containing authentication parameters.

Private Methods

Method Description
CreateFromResourceUrlCommonAsync ( Uri resourceUrl ) : Task
CreateFromUnauthorizedResponseCommon ( IHttpWebResponse response ) : AuthenticationParameters

Method Details

CreateFromResourceUrlAsync() public static method

Creates authentication parameters from address of the resource. This method expects the resource server to return unauthorized response with WWW-Authenticate header containing authentication parameters.
public static CreateFromResourceUrlAsync ( Uri resourceUrl ) : Task
resourceUrl System.Uri Address of the resource
return Task

CreateFromResponseAuthenticateHeader() public static method

Creates authentication parameters from the WWW-Authenticate header in response received from resource. This method expects the header to contain authentication parameters.
public static CreateFromResponseAuthenticateHeader ( string authenticateHeader ) : AuthenticationParameters
authenticateHeader string Content of header WWW-Authenticate header
return AuthenticationParameters

CreateFromUnauthorizedResponseAsync() public static method

Creates authentication parameters from the response received from the response received from the resource. This method expects the response to have unauthorized status and WWW-Authenticate header containing authentication parameters.
public static CreateFromUnauthorizedResponseAsync ( HttpResponseMessage responseMessage ) : Task
responseMessage System.Net.Http.HttpResponseMessage Response received from the resource (e.g. via an http call using HttpClient).
return Task