C# Class BrockAllen.OAuth2.OAuth2Client

Afficher le fichier Open project: brockallen/BrockAllen.OAuth2 Class Usage Examples

Méthodes publiques

Méthode Description
OAuth2Client ( ProviderType providerType, string clientID, string clientSecret, string scope = null ) : Newtonsoft.Json.Linq
ProcessCallbackAsync ( ) : Task
RedirectToAuthorizationProvider ( ProviderType providerType, string returnUrl = null ) : void
RegisterCustomOAuthCallback ( RouteCollection routes, string action, string controller, string area = null ) : void
RegisterProvider ( ProviderType providerType, string clientID, string clientSecret, string scope = null, NameValueCollection additionalParameters = null ) : void

Private Methods

Méthode Description
GetContext ( ) : AuthorizationContext
GetProvider ( ProviderType providerType ) : Provider
OAuth2Client ( ) : Newtonsoft.Json.Linq
Protect ( byte data ) : string
SaveContext ( AuthorizationContext authCtx ) : void
Unprotect ( string value ) : byte[]

Method Details

OAuth2Client() public méthode

public OAuth2Client ( ProviderType providerType, string clientID, string clientSecret, string scope = null ) : Newtonsoft.Json.Linq
providerType ProviderType
clientID string
clientSecret string
scope string
Résultat Newtonsoft.Json.Linq

ProcessCallbackAsync() public méthode

public ProcessCallbackAsync ( ) : Task
Résultat Task

RedirectToAuthorizationProvider() public méthode

public RedirectToAuthorizationProvider ( ProviderType providerType, string returnUrl = null ) : void
providerType ProviderType
returnUrl string
Résultat void

RegisterCustomOAuthCallback() public static méthode

public static RegisterCustomOAuthCallback ( RouteCollection routes, string action, string controller, string area = null ) : void
routes RouteCollection
action string
controller string
area string
Résultat void

RegisterProvider() public méthode

public RegisterProvider ( ProviderType providerType, string clientID, string clientSecret, string scope = null, NameValueCollection additionalParameters = null ) : void
providerType ProviderType
clientID string
clientSecret string
scope string
additionalParameters System.Collections.Specialized.NameValueCollection
Résultat void