C# Class WindowsAzure.Acs.Oauth2.ResourceServer.OAuth2MessageHandler

Inheritance: System.Net.Http.DelegatingHandler
Afficher le fichier Open project: maartenba/WindowsAzure.Acs.Oauth2

Méthodes publiques

Méthode Description
AddAuthenticationStep ( IAuthenticationStep step ) : void
GetTokenFromAuthorizationHeader ( HttpRequestMessage request ) : string

Gets the access token from the Authorization header of the incoming request.

OAuth2MessageHandler ( ) : System
OAuth2MessageHandler ( string realm, string issuer, string tokenSigningKey ) : System
SetAuthenticationPipeline ( IEnumerable pipeline ) : void

Méthodes protégées

Méthode Description
ReadAndValidateToken ( string accessToken, WindowsAzure.Acs.Oauth2.ResourceServer.ResourceAccessErrorResponse &error ) : bool

This method parses the incoming token and validates it.

SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
TryReadAccessToken ( HttpRequestMessage request, string &accessToken ) : bool

This method looks for the access token in the incoming request.

Method Details

AddAuthenticationStep() public méthode

public AddAuthenticationStep ( IAuthenticationStep step ) : void
step IAuthenticationStep
Résultat void

GetTokenFromAuthorizationHeader() public méthode

Gets the access token from the Authorization header of the incoming request.
public GetTokenFromAuthorizationHeader ( HttpRequestMessage request ) : string
request System.Net.Http.HttpRequestMessage The Http request message.
Résultat string

OAuth2MessageHandler() public méthode

public OAuth2MessageHandler ( ) : System
Résultat System

OAuth2MessageHandler() public méthode

public OAuth2MessageHandler ( string realm, string issuer, string tokenSigningKey ) : System
realm string
issuer string
tokenSigningKey string
Résultat System

ReadAndValidateToken() protected méthode

This method parses the incoming token and validates it.
protected ReadAndValidateToken ( string accessToken, WindowsAzure.Acs.Oauth2.ResourceServer.ResourceAccessErrorResponse &error ) : bool
accessToken string The incoming access token.
error WindowsAzure.Acs.Oauth2.ResourceServer.ResourceAccessErrorResponse This out paramter is set if any error occurs.
Résultat bool

SendAsync() protected méthode

protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage
cancellationToken System.Threading.CancellationToken
Résultat Task

SetAuthenticationPipeline() public méthode

public SetAuthenticationPipeline ( IEnumerable pipeline ) : void
pipeline IEnumerable
Résultat void

TryReadAccessToken() protected méthode

This method looks for the access token in the incoming request.
protected TryReadAccessToken ( HttpRequestMessage request, string &accessToken ) : bool
request System.Net.Http.HttpRequestMessage The incoming request message.
accessToken string This out parameter contains the access token if found.
Résultat bool