C# Класс Glipho.OAuth.Providers.Database.Mongo.IssuedTokens

MongoDB implementation of the IIssuedTokens database.
Наследование: MongoDbClient, IIssuedTokens
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
EnsureIndexesExist ( ) : void

Ensure the relevant indexes exist.

GetConsumerStub ( string key ) : ConsumerStub

Get a consumer stub.

InitialiseClass ( ) : void

Initialise the class.

Описание методов

Create() публичный Метод

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.
Результат string

Get() публичный Метод

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.
Результат Database.IssuedToken

IssuedTokens() публичный Метод

Initialises a new instance of the IssuedTokens class.
public IssuedTokens ( ) : System
Результат System

IssuedTokens() публичный Метод

Initialises a new instance of the IssuedTokens class.
public IssuedTokens ( string connectionString ) : System
connectionString string The connection string.
Результат System

Remove() публичный Метод

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.
Результат bool

Update() публичный Метод

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.
Результат bool