Method | Description | |
---|---|---|
AuthoriseRequestToken ( string username, IServiceProviderRequestToken requestToken ) : bool |
Authorise a request token by adding a user to it.
|
|
ExpireRequestTokenAndStoreNewAccessToken ( string consumerKey, string requestToken, string accessToken, string accessTokenSecret ) : void |
Deletes a request token and its associated secret and stores a new access token and secret. Any scope of granted privileges associated with the request token from the original call to TokenManager.StoreNewRequestToken(UnauthorizedTokenRequest,ITokenSecretContainingMessage) should be carried over to the new Access Token. To associate a user account with the new access token, |
|
GetAccessToken ( string token ) : IServiceProviderAccessToken |
Gets details on the named access token. It is acceptable for implementations to find the token, see that it has expired, delete it from the database and then throw KeyNotFoundException, or alternatively it can return the expired token anyway and the OAuth channel will log and throw the appropriate error. |
|
GetConsumer ( string consumerKey ) : IConsumerDescription |
Gets the Consumer description for a given a Consumer Key.
|
|
GetRequestToken ( string token ) : IServiceProviderRequestToken |
Gets details on the named request token. It is acceptable for implementations to find the token, see that it has expired, delete it from the database and then throw KeyNotFoundException, or alternatively it can return the expired token anyway and the OAuth channel will log and throw the appropriate error. |
|
GetTokenSecret ( string token ) : string |
Gets the Token Secret given a request or access token.
|
|
GetTokenType ( string token ) : TokenType |
Classifies a token as a request token or an access token.
|
|
IsRequestTokenAuthorized ( string requestToken ) : bool |
Checks whether a given request token has already been authorized by some user for use by the Consumer that requested it.
|
|
StoreNewRequestToken ( DotNetOpenAuth.OAuth.Messages.UnauthorizedTokenRequest request, ITokenSecretContainingMessage response ) : void |
Stores a newly generated unauthorized request token, secret, and optional application-specific parameters for later recall. Request tokens stored by this method SHOULD NOT associate any user account with this token. It usually opens up security holes in your application to do so. Instead, you associate a user account with access tokens (not request tokens) in the TokenManager.ExpireRequestTokenAndStoreNewAccessToken(string, string, string, string) method. |
|
TokenManager ( Database consumers, Database issuedTokens ) : System |
Initialises a new instance of the TokenManager class.
|
|
UpdateToken ( IServiceProviderRequestToken token ) : void |
Persists any changes made to the token. This library will invoke this method after making a set of changes to the token as part of a web request to give the host the opportunity to persist those changes to a database. Depending on the object persistence framework the host site uses, this method MAY not need to do anything (if changes made to the token will automatically be saved without any extra handling). |
public AuthoriseRequestToken ( string username, IServiceProviderRequestToken requestToken ) : bool | ||
username | string | The username of the user to authorise the request token with. |
requestToken | IServiceProviderRequestToken | The request token being authorised. |
return | bool |
public ExpireRequestTokenAndStoreNewAccessToken ( string consumerKey, string requestToken, string accessToken, string accessTokenSecret ) : void | ||
consumerKey | string | The Consumer that is exchanging its request token for an access token. |
requestToken | string | The Consumer's request token that should be deleted/expired. |
accessToken | string | The new access token that is being issued to the Consumer. |
accessTokenSecret | string | The secret associated with the newly issued access token. |
return | void |
public GetAccessToken ( string token ) : IServiceProviderAccessToken | ||
token | string | The access token. |
return | IServiceProviderAccessToken |
public GetConsumer ( string consumerKey ) : IConsumerDescription | ||
consumerKey | string | The Consumer Key. |
return | IConsumerDescription |
public GetRequestToken ( string token ) : IServiceProviderRequestToken | ||
token | string | The request token. |
return | IServiceProviderRequestToken |
public GetTokenSecret ( string token ) : string | ||
token | string | The request or access token. |
return | string |
public GetTokenType ( string token ) : TokenType | ||
token | string | The token to classify. |
return | TokenType |
public IsRequestTokenAuthorized ( string requestToken ) : bool | ||
requestToken | string | The Consumer's request token. |
return | bool |
public StoreNewRequestToken ( DotNetOpenAuth.OAuth.Messages.UnauthorizedTokenRequest request, ITokenSecretContainingMessage response ) : void | ||
request | DotNetOpenAuth.OAuth.Messages.UnauthorizedTokenRequest | The request message that resulted in the generation of a new unauthorized request token. |
response | ITokenSecretContainingMessage | The response message that includes the unauthorized request token. |
return | void |
public TokenManager ( Database consumers, Database issuedTokens ) : System | ||
consumers | Database | The consumers database client. |
issuedTokens | Database | The issued tokens database client. |
return | System |
public UpdateToken ( IServiceProviderRequestToken token ) : void | ||
token | IServiceProviderRequestToken | The token whose properties have been changed. |
return | void |