C# Class OpenStack.Security.Authentication.DelegatingPartialAuthenticationService

This class serves as the base class for IAuthenticationService implementations which only authenticate certain HTTP API calls.
Inheritance: IAuthenticationService
Afficher le fichier Open project: crowdy/OpenStack-ConoHa

Méthodes publiques

Méthode Description
AuthenticateRequestAsync ( HttpRequestMessage requestMessage, CancellationToken cancellationToken ) : Task This implementation calls IsAuthenticatedCall to determine whether or not a particular HTTP API call should be treated as an "authenticated" call. The behavior of this method depends on the result of that method, as shown in the following table. IsAuthenticatedCall Behavior Authenticate requestMessage using the AuthenticatedCallsService authentication service. Authenticate requestMessage using the UnauthenticatedCallsService authentication service. Return without altering requestMessage at all.
GetBaseAddressAsync ( string serviceType, string serviceName, string region, bool internalAddress, CancellationToken cancellationToken ) : Task

The base implementation always uses AuthenticatedCallsService to provide the behavior for this method.

Méthodes protégées

Méthode Description
DelegatingPartialAuthenticationService ( IAuthenticationService authenticatedCallsService, IAuthenticationService unauthenticatedCallsService ) : System

Initializes a new instance of the DelegatingPartialAuthenticationService class with the specified delegate authentication service implementations to use for authenticating calls made from a client.

IsAuthenticatedCall ( HttpRequestMessage requestMessage ) : bool?

Determines whether or not a particular HTTP API call should be treated as an authenticated call or an unauthenticated call.

Method Details

AuthenticateRequestAsync() public méthode

This implementation calls IsAuthenticatedCall to determine whether or not a particular HTTP API call should be treated as an "authenticated" call. The behavior of this method depends on the result of that method, as shown in the following table. IsAuthenticatedCall Behavior Authenticate requestMessage using the AuthenticatedCallsService authentication service. Authenticate requestMessage using the UnauthenticatedCallsService authentication service. Return without altering requestMessage at all.
public AuthenticateRequestAsync ( HttpRequestMessage requestMessage, CancellationToken cancellationToken ) : Task
requestMessage System.Net.Http.HttpRequestMessage
cancellationToken System.Threading.CancellationToken
Résultat Task

DelegatingPartialAuthenticationService() protected méthode

Initializes a new instance of the DelegatingPartialAuthenticationService class with the specified delegate authentication service implementations to use for authenticating calls made from a client.
/// If is . /// -or- /// If is . ///
protected DelegatingPartialAuthenticationService ( IAuthenticationService authenticatedCallsService, IAuthenticationService unauthenticatedCallsService ) : System
authenticatedCallsService IAuthenticationService /// The authentication service to use for authenticated HTTP API calls. ///
unauthenticatedCallsService IAuthenticationService /// The authentication service to use for unauthenticated HTTP API calls. ///
Résultat System

GetBaseAddressAsync() public méthode

The base implementation always uses AuthenticatedCallsService to provide the behavior for this method.

If a recursive call to this method is detected.
public GetBaseAddressAsync ( string serviceType, string serviceName, string region, bool internalAddress, CancellationToken cancellationToken ) : Task
serviceType string
serviceName string
region string
internalAddress bool
cancellationToken System.Threading.CancellationToken
Résultat Task

IsAuthenticatedCall() protected abstract méthode

Determines whether or not a particular HTTP API call should be treated as an authenticated call or an unauthenticated call.
/// If is . ///
protected abstract IsAuthenticatedCall ( HttpRequestMessage requestMessage ) : bool?
requestMessage System.Net.Http.HttpRequestMessage The representing the HTTP API call.
Résultat bool?