C# Class Glipho.OAuth.Providers.NonceDbStore

A database-backed nonce store for OAuth services.
Inheritance: INonceStore
Afficher le fichier Open project: Glipho/oauth-providers Class Usage Examples

Méthodes publiques

Méthode Description
NonceDbStore ( Database nonces ) : System

Initialises a new instance of the NonceDbStore class.

StoreNonce ( string context, string nonce, System.DateTime timestampUtc ) : bool

Stores a given nonce and timestamp.

The nonce must be stored for no less than the maximum time window a message may be processed within before being discarded as an expired message. This maximum message age can be looked up via the P:DotNetOpenAuth.Configuration.MessagingElement.MaximumMessageLifetime property, accessible via the P:DotNetOpenAuth.Configuration.MessagingElement.Configuration property.

Private Methods

Méthode Description
ClearNoncesIfAppropriate ( ) : void

Clears the nonces if appropriate.

NonceDbStore ( ) : System

Initialises static members of the NonceDbStore class.

Method Details

NonceDbStore() public méthode

Initialises a new instance of the NonceDbStore class.
public NonceDbStore ( Database nonces ) : System
nonces Database /// The nonces database client. ///
Résultat System

StoreNonce() public méthode

Stores a given nonce and timestamp.
The nonce must be stored for no less than the maximum time window a message may be processed within before being discarded as an expired message. This maximum message age can be looked up via the P:DotNetOpenAuth.Configuration.MessagingElement.MaximumMessageLifetime property, accessible via the P:DotNetOpenAuth.Configuration.MessagingElement.Configuration property.
public StoreNonce ( string context, string nonce, System.DateTime timestampUtc ) : bool
context string The context, or namespace, within which the /// must be unique. /// The context SHOULD be treated as case-sensitive. /// The value will never be null but may be the empty string.
nonce string A series of random characters.
timestampUtc System.DateTime The UTC timestamp that together with the nonce string make it unique /// within the given . /// The timestamp may also be used by the data store to clear out old nonces.
Résultat bool