C# Class Glipho.OAuth.Providers.Database.Mongo.Nonces

MongoDB implementation of the INonces database.
Inheritance: MongoDbClient, INonces
ファイルを表示 Open project: Glipho/oauth-providers

Public Methods

Method Description
Add ( Database nonce ) : bool

Adds a nonce to the database.

Nonces ( ) : System

Initialises a new instance of the Nonces class.

Nonces ( string connectionString ) : System

Initialises a new instance of the Nonces class.

RemoveExpired ( ) : bool

Remove all expired nonces from the database.

Private Methods

Method Description
EnsureIndexesExist ( ) : void

Ensure the relevant indexes exist.

InitialiseClass ( ) : void

Initialise the class.

Method Details

Add() public method

Adds a nonce to the database.
Thrown if a parameter is null. Thrown if an error occurs while executing the requested command.
public Add ( Database nonce ) : bool
nonce MongoDB.Driver.Database Details of the nonce to add.
return bool

Nonces() public method

Initialises a new instance of the Nonces class.
public Nonces ( ) : System
return System

Nonces() public method

Initialises a new instance of the Nonces class.
public Nonces ( string connectionString ) : System
connectionString string The connection string.
return System

RemoveExpired() public method

Remove all expired nonces from the database.
Thrown if an error occurs while executing the requested command.
public RemoveExpired ( ) : bool
return bool