C# Класс OpenStack.Security.Authentication.DelegatingPartialAuthenticationService

This class serves as the base class for IAuthenticationService implementations which only authenticate certain HTTP API calls.
Наследование: IAuthenticationService
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

AuthenticateRequestAsync() публичный Метод

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
Результат Task

DelegatingPartialAuthenticationService() защищенный Метод

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. ///
Результат System

GetBaseAddressAsync() публичный Метод

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
Результат Task

IsAuthenticatedCall() защищенный абстрактный Метод

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.
Результат bool?