C# Class Facebook.Graph.Web.AuthorizationCallbackHandler

Provides the basic functionality for a custom HTTP handler used to support the OpenGraph OAuth protocol as a web server client.
Inheritance: IHttpHandler
Show file Open project: prabirshrestha/opengraph.net

Private Properties

Property Type Description
DetermineErrorReasonKnownValue string
GetAppConfig ApplicationConfigurationElement
GetHandlerConfig Facebook.OpenGraph.Configuration.HandlerConfigurationElement
IHttpHandler void

Protected Methods

Method Description
HandleErrorResponse ( string errorReason ) : void

When implemented in a derived class, handles an unsuccessful response.

HandleSuccess ( string accessToken ) : void

Invokes HandleSuccess(System.String, System.DateTime) with a DateTime value of DateTime.MaxValue, indicating an infinite session.

HandleSuccess ( string accessToken, System.DateTime expiration ) : void

When implemented in a derived class, handles a successful authentication response and access token.

Private Methods

Method Description
DetermineErrorReasonKnownValue ( string errorReason ) : string
GetAppConfig ( HandlerConfigurationElement handlerConfig ) : ApplicationConfigurationElement
GetHandlerConfig ( ) : HandlerConfigurationElement
IHttpHandler ( HttpContext context ) : void

Method Details

HandleErrorResponse() protected abstract method

When implemented in a derived class, handles an unsuccessful response.
protected abstract HandleErrorResponse ( string errorReason ) : void
errorReason string /// The error reason. Known error reasons are: /// /// user_denied indicates that the user denied one or more extended permissions. /// unknown_expiration indicates that the server didn't recognize the expiration value that was included /// in the access token. /// unknown_response indicates that all expected response parameters were not included. /// ///
return void

HandleSuccess() protected method

Invokes HandleSuccess(System.String, System.DateTime) with a DateTime value of DateTime.MaxValue, indicating an infinite session.
protected HandleSuccess ( string accessToken ) : void
accessToken string The access token provided by OAuth.
return void

HandleSuccess() protected abstract method

When implemented in a derived class, handles a successful authentication response and access token.
protected abstract HandleSuccess ( string accessToken, System.DateTime expiration ) : void
accessToken string The token with which to create an authenticated session.
expiration System.DateTime The time (relative to the application requesting the token) at which the token expires. If the user allowed for the offline_access extended permission /// (represented by ), then this parameter will be .
return void