Property | Type | Description | |
---|---|---|---|
OAuth2Endpoint | System |
Method | Description | |
---|---|---|
GetAuthorizationUrl ( OAuth2ResponseType oAuth2ResponseType, string state = null ) : string |
Creates an authorization url that can be used to authorize access to a user's account.
|
|
GetTokenByCodeAsync ( string code ) : Task |
After the user authorizes, the pin is returned as a code to your application via the redirect URL you specified during registration, in the form of a regular query string parameter.
|
|
GetTokenByPinAsync ( string pin ) : Task |
After the user authorizes, they will receive a PIN code that they copy into your app.
|
|
GetTokenByRefreshTokenAsync ( string refreshToken ) : Task |
If a user has authorized their account but you no longer have a valid access_token for them, then a new one can be generated by using the refreshToken. When your application receives a refresh token, it is important to store that refresh token for future use. If your application loses the refresh token, you will have to prompt the user for their login information again.
|
|
OAuth2Endpoint ( IApiClient apiClient ) : System |
Initializes a new instance of the OAuth2Endpoint class.
|
Method | Description | |
---|---|---|
OAuth2Endpoint ( IApiClient apiClient, |
Initializes a new instance of the OAuth2Endpoint class.
|
public GetAuthorizationUrl ( OAuth2ResponseType oAuth2ResponseType, string state = null ) : string | ||
oAuth2ResponseType | OAuth2ResponseType | Determines if Imgur returns a Code, a PIN code, or an opaque Token. |
state | string | /// This optional parameter indicates any state which may be useful to your application upon receipt of /// the response. /// |
return | string |
public GetTokenByCodeAsync ( string code ) : Task |
||
code | string | The code from the query string. |
return | Task |
public GetTokenByPinAsync ( string pin ) : Task |
||
pin | string | The PIN that the user is prompted to enter. |
return | Task |
public GetTokenByRefreshTokenAsync ( string refreshToken ) : Task |
||
refreshToken | string | |
return | Task |
public OAuth2Endpoint ( IApiClient apiClient ) : System | ||
apiClient | IApiClient | The type of client that will be used for authentication. |
return | System |