C# Класс BrockAllen.OAuth2.OAuth2Client

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
GetContext ( ) : AuthorizationContext
GetProvider ( ProviderType providerType ) : Provider
OAuth2Client ( ) : Newtonsoft.Json.Linq
Protect ( byte data ) : string
SaveContext ( AuthorizationContext authCtx ) : void
Unprotect ( string value ) : byte[]

Описание методов

OAuth2Client() публичный Метод

public OAuth2Client ( ProviderType providerType, string clientID, string clientSecret, string scope = null ) : Newtonsoft.Json.Linq
providerType ProviderType
clientID string
clientSecret string
scope string
Результат Newtonsoft.Json.Linq

ProcessCallbackAsync() публичный Метод

public ProcessCallbackAsync ( ) : Task
Результат Task

RedirectToAuthorizationProvider() публичный Метод

public RedirectToAuthorizationProvider ( ProviderType providerType, string returnUrl = null ) : void
providerType ProviderType
returnUrl string
Результат void

RegisterCustomOAuthCallback() публичный статический Метод

public static RegisterCustomOAuthCallback ( RouteCollection routes, string action, string controller, string area = null ) : void
routes RouteCollection
action string
controller string
area string
Результат void

RegisterProvider() публичный Метод

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
Результат void