C# Class BrockAllen.OAuth2.OAuth2Client

Show file Open project: brockallen/BrockAllen.OAuth2 Class Usage Examples

Public Methods

Method 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

Method 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 method

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

ProcessCallbackAsync() public method

public ProcessCallbackAsync ( ) : Task
return Task

RedirectToAuthorizationProvider() public method

public RedirectToAuthorizationProvider ( ProviderType providerType, string returnUrl = null ) : void
providerType ProviderType
returnUrl string
return void

RegisterCustomOAuthCallback() public static method

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

RegisterProvider() public method

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
return void