Method | Description | |
---|---|---|
AuthorizeWithCode ( string code ) : System.Threading.Tasks.Task |
Gets the token set from the code in the query string of the callback url. Throws a
|
|
AuthorizeWithPin ( string pin ) : System.Threading.Tasks.Task |
Gets the token set from the pin the user has inputted. Throws a
|
|
AuthorizeWithToken ( string accessToken, string refreshToken, int expiresIn, string authorizedUsername ) : void |
Authorizes with the tokens that you recieved from the url in CreateAuthorizationUrl
|
|
CreateAuthorizationUrl ( OAuth2Type responseType, string state = null ) : string |
Creates the Authorization Url, that the user will visit to allow your application to access their user account. For more information on how OAuth2 on Imgur works, visit their Developer Section (https://api.imgur.com/oauth2)
|
|
OAuth2Authentication ( string clientId, string clientSecret, bool checkRateLimit ) : System |
Creates a new Imgur Authorization based off of a client's ClientId.
|
|
RefreshTokens ( ) : System.Threading.Tasks.Task |
Gets a new AccessToken and RefreshToken
|
Method | Description | |
---|---|---|
GrantTypeFromOAuthType ( OAuth2Type oAuth2Type ) : string |
Generates a grant_type from the OAuth2 Type used in this authentication
|
public AuthorizeWithCode ( string code ) : System.Threading.Tasks.Task | ||
code | string | The code from the callback Url. |
return | System.Threading.Tasks.Task |
public AuthorizeWithPin ( string pin ) : System.Threading.Tasks.Task | ||
pin | string | The pin the user entered. |
return | System.Threading.Tasks.Task |
public AuthorizeWithToken ( string accessToken, string refreshToken, int expiresIn, string authorizedUsername ) : void | ||
accessToken | string | The |
refreshToken | string | The |
expiresIn | int | The |
authorizedUsername | string | The Username of the account that has been authorized. |
return | void |
public CreateAuthorizationUrl ( OAuth2Type responseType, string state = null ) : string | ||
responseType | OAuth2Type | /// The type of response you want to use. It's recomended that; /// - Pin: Desktop/Server/Mobile Applications /// - Code: Desktop/Server/Mobile Applications /// - Token: Javascript Applications /// |
state | string | The state you want to pass through auth. This will be given back to you from the re-direct url if you use Code or Token Authentication. |
return | string |
public OAuth2Authentication ( string clientId, string clientSecret, bool checkRateLimit ) : System | ||
clientId | string | The ClientId of your imgur client. Create one here (https://api.imgur.com/oauth2/addclient). |
clientSecret | string | The ClientSecret of your imgur client. Create one here (https://api.imgur.com/oauth2/addclient). |
checkRateLimit | bool | Check, and populate the current ratelimit status of your client. |
return | System |
public RefreshTokens ( ) : System.Threading.Tasks.Task | ||
return | System.Threading.Tasks.Task |