C# Class Glipho.OAuth.Providers.Consumers

Implementation of the IConsumers interface.
Inheritance: IConsumers
Afficher le fichier Open project: Glipho/oauth-providers

Méthodes publiques

Méthode Description
Consumers ( Database consumers ) : System

Initialises a new instance of the Consumers class.

Create ( string name ) : Consumer

Create a new consumer.

Create ( string name, Uri callback ) : Consumer

Create a new Consumer with a callback URL.

Create ( string name, Uri callback, X509Certificate2 certificate ) : Consumer

Create a new Consumer with a callback URL and a X509 certificate.

Create ( string name, X509Certificate2 certificate ) : Consumer

Create a new Consumer with a X509 certificate.

Get ( string key ) : Consumer

Retrieve a Consumer.

List ( int offset, int limit ) : IList

List all consumers by name.

If there are no results with the given range, an empty list should be returned.

Private Methods

Méthode Description
GenerateConsumerSecret ( int binaryLength ) : string

Gets a cryptographically strong random sequence of values.

GetCryptoRandomData ( int length ) : byte[]

Gets a cryptographically strong random sequence of values.

Method Details

Consumers() public méthode

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

Create() public méthode

Create a new consumer.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Create ( string name ) : Consumer
name string The name of the to create.
Résultat Consumer

Create() public méthode

Create a new Consumer with a callback URL.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Create ( string name, Uri callback ) : Consumer
name string The name of the to create.
callback System.Uri The callback URL of the .
Résultat Consumer

Create() public méthode

Create a new Consumer with a callback URL and a X509 certificate.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Create ( string name, Uri callback, X509Certificate2 certificate ) : Consumer
name string The name of the to create.
callback System.Uri The callback URL of the .
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The X509 certificate for the user.
Résultat Consumer

Create() public méthode

Create a new Consumer with a X509 certificate.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Create ( string name, X509Certificate2 certificate ) : Consumer
name string The name of the to create.
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The X509 certificate for the user.
Résultat Consumer

Get() public méthode

Retrieve a Consumer.
Thrown if a parameter is not valid. Thrown if an error occurs while executing the requested command.
public Get ( string key ) : Consumer
key string The key of the to return.
Résultat Consumer

List() public méthode

List all consumers by name.

If there are no results with the given range, an empty list should be returned.

Thrown if a parameter is outside of a permitted range. Thrown if an error occurs while executing the requested command.
public List ( int offset, int limit ) : IList
offset int The amount to offset the results by. Minimum of 0.
limit int The maximum number of results to return. Minimum of 0 and maximum of 100.
Résultat IList