C# Class Facebook.Graph.Web.Mvc.AuthorizationController

Implements the basic behavior necessary for a Controller class to handle incoming OpenGraph authorization requests. For more information, see How to: Create an OpenGraph ASP.NET MVC Application.
Inheritance: Controller
Show file Open project: prabirshrestha/opengraph.net

Protected Methods

Method Description
HandleErrorResponse ( string applicationName, string errorReason ) : System.Web.Mvc.ActionResult

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

HandleSuccess ( string applicationName, string accessToken ) : System.Web.Mvc.ActionResult

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

HandleSuccess ( string applicationName, string accessToken, System.DateTime expiration ) : System.Web.Mvc.ActionResult

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

Private Methods

Method Description
Authorize ( string applicationName, string code, string errorCode, string accessToken, long expiration ) : System.Web.Mvc.ActionResult
DetermineErrorReasonKnownValue ( string errorCode ) : string
GetAppConfig ( HandlerConfigurationElement handlerConfig ) : ApplicationConfigurationElement
GetHandlerConfig ( string appName ) : HandlerConfigurationElement

Method Details

HandleErrorResponse() protected abstract method

When implemented in a derived class, handles an unsuccessful response.
protected abstract HandleErrorResponse ( string applicationName, string errorReason ) : System.Web.Mvc.ActionResult
applicationName string The name of the application requesting the access.
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 System.Web.Mvc.ActionResult

HandleSuccess() protected method

Invokes HandleSuccess(System.String, System.String, System.DateTime) with a DateTime value of DateTime.MaxValue, indicating an infinite session.
protected HandleSuccess ( string applicationName, string accessToken ) : System.Web.Mvc.ActionResult
applicationName string The name of the application that was approved for access.
accessToken string The access token provided by OAuth.
return System.Web.Mvc.ActionResult

HandleSuccess() protected abstract method

When implemented in a derived class, handles a successful authentication response and access token.
protected abstract HandleSuccess ( string applicationName, string accessToken, System.DateTime expiration ) : System.Web.Mvc.ActionResult
applicationName string The name of the application that was approved for access.
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 System.Web.Mvc.ActionResult