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

Inheritance: System.Net.Http.DelegatingHandler
Datei anzeigen Open project: maartenba/WindowsAzure.Acs.Oauth2

Public Methods

Method 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

Protected Methods

Method 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 method

public AddAuthenticationStep ( IAuthenticationStep step ) : void
step IAuthenticationStep
return void

GetTokenFromAuthorizationHeader() public method

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.
return string

OAuth2MessageHandler() public method

public OAuth2MessageHandler ( ) : System
return System

OAuth2MessageHandler() public method

public OAuth2MessageHandler ( string realm, string issuer, string tokenSigningKey ) : System
realm string
issuer string
tokenSigningKey string
return System

ReadAndValidateToken() protected method

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.
return bool

SendAsync() protected method

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

SetAuthenticationPipeline() public method

public SetAuthenticationPipeline ( IEnumerable pipeline ) : void
pipeline IEnumerable
return void

TryReadAccessToken() protected method

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.
return bool