C# Class Hyper.Http.AuthenticationHandler

AuthenticationHandler class.
Inheritance: System.Net.Http.DelegatingHandler
Mostra file Open project: tmitchel2/Hyper

Public Methods

Method Description
AuthenticationHandler ( HyperHttpSelfHostConfiguration configuration ) : System

Initializes a new instance of the AuthenticationHandler class.

Protected Methods

Method Description
SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.

Private Methods

Method Description
Authenticate ( HttpRequestMessage request, string username, string password ) : void

Authenticates the specified username password.

FromEncodedUsernamePassword ( string value, string &username, string &password ) : void

Froms the encoded username password.

SetSessionId ( HttpRequestMessage request, System.Guid sessionId ) : void

Sets the session id.

ToEncodedUsernamePassword ( string username, string password ) : string

To the encoded username password.

TryGetUsernamePassword ( HttpRequestMessage request, string &username, string &password, System.Guid &sessionId ) : bool

Gets the username password.

UpdateCookies ( HttpRequestMessage request, HttpResponseMessage response, string username, string password, System.Guid sessionId ) : void

Updates the cookies.

Method Details

AuthenticationHandler() public method

Initializes a new instance of the AuthenticationHandler class.
public AuthenticationHandler ( HyperHttpSelfHostConfiguration configuration ) : System
configuration Hyper.Http.SelfHost.HyperHttpSelfHostConfiguration The configuration.
return System

SendAsync() protected method

Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.
protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage The HTTP request message to send to the server.
cancellationToken System.Threading.CancellationToken A cancellation token to cancel operation.
return Task