Method | Description | |
---|---|---|
AuthorizeRequest ( |
Adds the OAuth authorization token to an outgoing HTTP request, renewing a (nearly) expired access token if necessary.
|
|
AuthorizeRequest ( |
Adds the necessary HTTP Authorization header to an HTTP request for protected resources so that the Service Provider will allow the request through.
|
|
ExchangeUserCredentialForToken ( string userName, string password, IEnumerable |
Exchanges a resource owner's password credential for OAuth 2.0 refresh and access tokens.
|
|
GetClientAccessToken ( IEnumerable |
Obtains an access token for accessing client-controlled resources on the resource server.
|
|
GetScopedAccessToken ( string refreshToken, HashSet |
Gets an access token that may be used for only a subset of the scope for which a given refresh token is authorized. If the return value includes a new refresh token, the old refresh token should be discarded and replaced with the new one. |
|
RefreshAuthorization ( IAuthorizationState authorization, System.TimeSpan skipIfUsefulLifeExceeds = null ) : bool |
Refreshes a short-lived access token using a longer-lived refresh token with a new access token that has the same scope as the refresh token. The refresh token itself may also be refreshed. This method may modify the value of the IAuthorizationState.RefreshToken property on the authorization parameter if the authorization server has cycled out your refresh token. If the parameter value was updated, this method calls IAuthorizationState.SaveChanges on that instance. |
Method | Description | |
---|---|---|
ClientBase ( DotNetOpenAuth.OAuth2.AuthorizationServerDescription authorizationServer, string clientIdentifier = null, string clientSecret = null ) : System |
Initializes a new instance of the ClientBase class.
|
Method | Description | |
---|---|---|
ProportionalLifeRemaining ( IAuthorizationState authorization ) : double |
Calculates the fraction of life remaining in an access token.
|
|
RequestAccessToken ( DotNetOpenAuth.OAuth2.Messages.ScopedAccessTokenRequest request, IEnumerable |
Requests an access token using a partially .initialized request message.
|
|
UpdateAuthorizationWithResponse ( IAuthorizationState authorizationState, DotNetOpenAuth.OAuth2.Messages.AccessTokenSuccessResponse accessTokenSuccess ) : void |
Updates the authorization state maintained by the client with the content of an outgoing response.
|
|
UpdateAuthorizationWithResponse ( IAuthorizationState authorizationState, DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationSuccessAccessTokenResponse accessTokenSuccess ) : void |
Updates the authorization state maintained by the client with the content of an outgoing response.
|
|
UpdateAuthorizationWithResponse ( IAuthorizationState authorizationState, DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationSuccessAuthCodeResponse authorizationSuccess ) : void |
Updates authorization state with a success response from the Authorization Server.
|
public AuthorizeRequest ( |
||
request | The request for protected resources from the service provider. | |
authorization | IAuthorizationState | The authorization for this request previously obtained via OAuth. |
return | void |
public static AuthorizeRequest ( |
||
request | The request for protected resources from the service provider. | |
accessToken | string | The access token previously obtained from the Authorization Server. |
return | void |
protected ClientBase ( DotNetOpenAuth.OAuth2.AuthorizationServerDescription authorizationServer, string clientIdentifier = null, string clientSecret = null ) : System | ||
authorizationServer | DotNetOpenAuth.OAuth2.AuthorizationServerDescription | The token issuer. |
clientIdentifier | string | The client identifier. |
clientSecret | string | The client secret. |
return | System |
public ExchangeUserCredentialForToken ( string userName, string password, IEnumerable |
||
userName | string | The resource owner's username, as it is known by the authorization server. |
password | string | The resource owner's account password. |
scopes | IEnumerable |
The desired scope of access. |
return | IAuthorizationState |
public GetClientAccessToken ( IEnumerable |
||
scopes | IEnumerable |
The desired scopes. |
return | IAuthorizationState |
public GetScopedAccessToken ( string refreshToken, HashSet |
||
refreshToken | string | The refresh token. |
scope | HashSet |
The scope subset desired in the access token. |
return | IAuthorizationState |
public RefreshAuthorization ( IAuthorizationState authorization, System.TimeSpan skipIfUsefulLifeExceeds = null ) : bool | ||
authorization | IAuthorizationState | The authorization to update. |
skipIfUsefulLifeExceeds | System.TimeSpan | If given, the access token will not be refreshed if its remaining lifetime exceeds this value. |
return | bool |