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

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

Public Methods

Method Description
Create ( Database issuedToken ) : string

Create a new token.

Get ( string token ) : Database.IssuedToken

Retrieve a consumer from the database.

IssuedTokens ( ) : System

Initialises a new instance of the IssuedTokens class.

IssuedTokens ( string connectionString ) : System

Initialises a new instance of the IssuedTokens class.

Remove ( string id ) : bool

Remove an issued token.

Update ( string token, Database updatedToken ) : bool

Update an existing token.

Private Methods

Method Description
EnsureIndexesExist ( ) : void

Ensure the relevant indexes exist.

GetConsumerStub ( string key ) : ConsumerStub

Get a consumer stub.

InitialiseClass ( ) : void

Initialise the class.

Method Details

Create() public method

Create a new token.
Thrown if a parameter is null. Thrown if an error occurs while executing the requested command.
public Create ( Database issuedToken ) : string
issuedToken MongoDB.Driver.Database The details of the token to create.
return string

Get() public method

Retrieve a consumer from the database.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Get ( string token ) : Database.IssuedToken
token string The token of the issued token to retrieve.
return Database.IssuedToken

IssuedTokens() public method

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

IssuedTokens() public method

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

Remove() public method

Remove an issued token.
Thrown if an error occurs while executing the requested command.
public Remove ( string id ) : bool
id string The identifier of the token to remove.
return bool

Update() public method

Update an existing token.
Thrown if a parameter is not valid. Thrown if a parameter is null. Thrown if an error occurs while executing the requested command.
public Update ( string token, Database updatedToken ) : bool
token string The token of the issued token to update.
updatedToken MongoDB.Driver.Database Details to update the token with.
return bool