C# Class SimpleAuth.OAuthApi

Inheritance: Api
Afficher le fichier Open project: Clancey/SimpleAuth Class Usage Examples

Protected Properties

Свойство Type Description
authenticator WebAuthenticator

Méthodes publiques

Méthode Description
OAuthApi ( string identifier, OAuthAuthenticator authenticator, HttpMessageHandler handler = null ) : System

Initializes a new instance of the T:SimpleAuth.OAuthApi class.

OAuthApi ( string identifier, string clientId, string clientSecret, string tokenUrl, string authorizationUrl, string redirectUrl = "http://localhost", HttpMessageHandler handler = null ) : System

Initializes a new instance of the T:SimpleAuth.OAuthApi class.

PrepareClient ( HttpClient client ) : System.Threading.Tasks.Task
ResetData ( ) : void

Méthodes protégées

Méthode Description
CreateAuthenticator ( ) : WebAuthenticator
GetAccountFromAuthCode ( WebAuthenticator authenticator, string identifier ) : Task
OAuthApi ( string identifier, string clientId, string clientSecret, HttpMessageHandler handler = null ) : System
PerformAuthenticate ( ) : Task
RefreshAccount ( Account account ) : Task
RefreshToken ( Account accaccount ) : Task

Private Methods

Méthode Description
OAuthApi ( ) : System

Method Details

CreateAuthenticator() protected méthode

protected CreateAuthenticator ( ) : WebAuthenticator
Résultat WebAuthenticator

GetAccountFromAuthCode() protected méthode

protected GetAccountFromAuthCode ( WebAuthenticator authenticator, string identifier ) : Task
authenticator WebAuthenticator
identifier string
Résultat Task

OAuthApi() public méthode

Initializes a new instance of the T:SimpleAuth.OAuthApi class.
public OAuthApi ( string identifier, OAuthAuthenticator authenticator, HttpMessageHandler handler = null ) : System
identifier string This is used to store and look up credentials/cookies for the API
authenticator OAuthAuthenticator OAuth Authenticator.
handler System.Net.Http.HttpMessageHandler Handler.
Résultat System

OAuthApi() protected méthode

protected OAuthApi ( string identifier, string clientId, string clientSecret, HttpMessageHandler handler = null ) : System
identifier string
clientId string
clientSecret string
handler System.Net.Http.HttpMessageHandler
Résultat System

OAuthApi() public méthode

Initializes a new instance of the T:SimpleAuth.OAuthApi class.
public OAuthApi ( string identifier, string clientId, string clientSecret, string tokenUrl, string authorizationUrl, string redirectUrl = "http://localhost", HttpMessageHandler handler = null ) : System
identifier string This is used to store and look up credentials/cookies for the API
clientId string OAuth Client identifier.
clientSecret string OAuth Client secret.
tokenUrl string URL for swaping out the token.
authorizationUrl string Login website URL.
redirectUrl string Redirect URL. Defaults to http://localhost
handler System.Net.Http.HttpMessageHandler Handler.
Résultat System

PerformAuthenticate() protected méthode

protected PerformAuthenticate ( ) : Task
Résultat Task

PrepareClient() public méthode

public PrepareClient ( HttpClient client ) : System.Threading.Tasks.Task
client System.Net.Http.HttpClient
Résultat System.Threading.Tasks.Task

RefreshAccount() protected méthode

protected RefreshAccount ( Account account ) : Task
account Account
Résultat Task

RefreshToken() protected méthode

protected RefreshToken ( Account accaccount ) : Task
accaccount Account
Résultat Task

ResetData() public méthode

public ResetData ( ) : void
Résultat void

Property Details

authenticator protected_oe property

protected WebAuthenticator,SimpleAuth authenticator
Résultat WebAuthenticator