C# Class Facebook.OAuthContext

Exposes site based authentication model. Fits well for a connected site.
Inheritance: AuthContextBase, IAuthContext
Afficher le fichier Open project: bbyk/graph.net Class Usage Examples

Méthodes publiques

Свойство Type Description
EmptyParams string>.Dictionary

Private Properties

Свойство Type Description
ParseAuthResult void
SaveSession void

Méthodes publiques

Méthode Description
Authenticate ( [ code, [ redirectUri ) : void

Authenticates with a code given synchronously. See for more information.

AuthenticateRequest ( [ context ) : bool

Authenticates current request synchronously. Returns true if the request is authenticated and Session is set; otherwise false.

BeginAuthenticate ( [ code, [ redirectUri, AsyncCallback cb, object state ) : IAsyncResult

Begins to authenticates with a code given synchronously. See for more information.

BeginAuthenticateRequest ( [ context, [ cb, [ state ) : IAsyncResult

Begin to authenticate current request synchronously. Returns true if the request is authenticated and Session is set; otherwise false.

EndAuthenticate ( IAsyncResult ar ) : void

Completes async authentication operation started by the BeginAuthenticate method.

EndAuthenticateRequest ( [ ar ) : bool

Fetches state of async operation. Corresponds to BeginAuthenticate method. Returns true if the request is authenticated and Session is set; otherwise false.

GetLoginUrl ( [ nextUrl ) : string

See IAuthContext.GetLoginUrl(Uri, Dictionary{String, String}).

GetLoginUrl ( [ nextUrl, [ @params ) : string

See IAuthContext.GetLoginUrl(Uri, LoginParams).

GetLoginUrl ( [ nextUrl, string>.[ @params ) : string

See IAuthContext.GetLoginUrl(Uri, Dictionary{String, String}).

GetLogoutUrl ( [ nextUrl ) : string

See IAuthContext.GetLogoutUrl(Uri, Dictionary{String, String}).

GetLogoutUrl ( [ nextUrl, string>.[ @params ) : string

See IAuthContext.GetLogoutUrl(Uri, Dictionary{String, String}).

OAuthContext ( [ appId, [ appSecret ) : System

Initializes a new OAuthContext object with specified appId and appSecret.

Méthodes protégées

Méthode Description
GetCurrentUrl ( HttpContext context ) : string

Generates url from the current HttpRequest.Url which is useful to pass into Authenticate or BeginAuthenticate methods as the redirectUri argument.

Private Methods

Méthode Description
ParseAuthResult ( string contentType, string json ) : void
SaveSession ( HttpContext context ) : void

Method Details

Authenticate() public méthode

Authenticates with a code given synchronously. See for more information.
The operation took longer then . either or is null.
public Authenticate ( [ code, [ redirectUri ) : void
code [ a verification string passed in the query string argument code when redirecting to
redirectUri [ a url which was passed to as next url argument. It should not contain query part.
Résultat void

AuthenticateRequest() public méthode

Authenticates current request synchronously. Returns true if the request is authenticated and Session is set; otherwise false.
is null. The operation took longer then .
public AuthenticateRequest ( [ context ) : bool
context [ http context to authenticate.
Résultat bool

BeginAuthenticate() public méthode

Begins to authenticates with a code given synchronously. See for more information.
either or is null.
public BeginAuthenticate ( [ code, [ redirectUri, AsyncCallback cb, object state ) : IAsyncResult
code [ a verification string passed in the query string argument code when redirecting to
redirectUri [ a url which was passed to as next url argument. It should not contain query part.
cb AsyncCallback a callback to call upon operation is completed.
state object the user state to pass to the callback.
Résultat IAsyncResult

BeginAuthenticateRequest() public méthode

Begin to authenticate current request synchronously. Returns true if the request is authenticated and Session is set; otherwise false.
is null.
public BeginAuthenticateRequest ( [ context, [ cb, [ state ) : IAsyncResult
context [ http context to authenticate.
cb [ a callback to call upon operation is completed.
state [ the user state to pass to the callback.
Résultat IAsyncResult

EndAuthenticate() public méthode

Completes async authentication operation started by the BeginAuthenticate method.
is null.
public EndAuthenticate ( IAsyncResult ar ) : void
ar IAsyncResult async state of the operation.
Résultat void

EndAuthenticateRequest() public méthode

Fetches state of async operation. Corresponds to BeginAuthenticate method. Returns true if the request is authenticated and Session is set; otherwise false.
is null.
public EndAuthenticateRequest ( [ ar ) : bool
ar [ async state of the operation.
Résultat bool

GetCurrentUrl() protected méthode

Generates url from the current HttpRequest.Url which is useful to pass into Authenticate or BeginAuthenticate methods as the redirectUri argument.
protected GetCurrentUrl ( HttpContext context ) : string
context System.Web.HttpContext
Résultat string

GetLoginUrl() public méthode

See IAuthContext.GetLoginUrl(Uri, Dictionary{String, String}).
is null.
public GetLoginUrl ( [ nextUrl ) : string
nextUrl [
Résultat string

GetLoginUrl() public méthode

See IAuthContext.GetLoginUrl(Uri, LoginParams).
is null.
public GetLoginUrl ( [ nextUrl, [ @params ) : string
nextUrl [
@params [
Résultat string

GetLoginUrl() public méthode

See IAuthContext.GetLoginUrl(Uri, Dictionary{String, String}).
is null.
public GetLoginUrl ( [ nextUrl, string>.[ @params ) : string
nextUrl [
@params string>.[
Résultat string

GetLogoutUrl() public méthode

See IAuthContext.GetLogoutUrl(Uri, Dictionary{String, String}).
is null.
public GetLogoutUrl ( [ nextUrl ) : string
nextUrl [
Résultat string

GetLogoutUrl() public méthode

See IAuthContext.GetLogoutUrl(Uri, Dictionary{String, String}).
is null.
public GetLogoutUrl ( [ nextUrl, string>.[ @params ) : string
nextUrl [
@params string>.[
Résultat string

OAuthContext() public méthode

Initializes a new OAuthContext object with specified appId and appSecret.
either or is null.
public OAuthContext ( [ appId, [ appSecret ) : System
appId [ Facebook application id.
appSecret [ Application secret.
Résultat System

Property Details

EmptyParams public_oe static_oe property

public static Dictionary EmptyParams
Résultat string>.Dictionary