C# Class Candor.Security.AzureStorageProvider.UserProvider

An Azure table storage implementation of the Candor.Security.UserProvider
Inheritance: Security.UserProvider
显示文件 Open project: michael-lang/candor-common

Private Properties

Property Type Description
InitializeInternal void

Public Methods

Method Description
GetLatestUserSessions ( System.Guid userId, Int32 take ) : List

Gets the latest session(s) for a given user.

GetUserByID ( System.Guid userId ) : User

Gets a user by identity.

GetUserByName ( string name ) : User

Gets a user by name.

Initialize ( string name, NameValueCollection config ) : void

Initializes the provider from the configuration values.

UserProvider ( ) : System

Creates a new instance.

UserProvider ( String name ) : System

Creates a new isntance with a specific name. No initialization.

UserProvider ( String name, String connectionName ) : System

Creates a new instance with a specific name and a single named connection used for all operations.

UserProvider ( String name, String connectionName, String connectionNameUser, String connectionNameUserSalt, String connectionNameAudit ) : System

Creates a new instance with a separate named connections for each secure area.

Protected Methods

Method Description
GetRecentFailedUserNameAuthenticationCount ( string name ) : int

Gets the number of times a user name has failed authentication within the configured allowable failure period.

GetSessionAuthenticationHistory ( UserSession session ) : AuthenticationHistory

Gets the authentication history for a specific session.

GetUserSalt ( System.Guid userId ) : UserSalt

Gets a user's salt metadata.

GetUserSession ( System.Guid renewalToken ) : UserSession

Gets a user session by the renewal token.

InsertUserHistory ( AuthenticationHistory history ) : void

Inserts a new user authentication history.

SaveUser ( User user ) : void

Saves a user, insert or update.

SaveUserSalt ( UserSalt salt ) : void

Saves a user salt, insert or update.

SaveUserSession ( UserSession session ) : void

Saves a user session, insert or update.

Private Methods

Method Description
InitializeInternal ( string name, NameValueCollection config ) : void

Method Details

GetLatestUserSessions() public method

Gets the latest session(s) for a given user.
public GetLatestUserSessions ( System.Guid userId, Int32 take ) : List
userId System.Guid The unique identity.
take System.Int32 The maximum number of sessions to retrieve.
return List

GetRecentFailedUserNameAuthenticationCount() protected method

Gets the number of times a user name has failed authentication within the configured allowable failure period.
protected GetRecentFailedUserNameAuthenticationCount ( string name ) : int
name string
return int

GetSessionAuthenticationHistory() protected method

Gets the authentication history for a specific session.
protected GetSessionAuthenticationHistory ( UserSession session ) : AuthenticationHistory
session UserSession
return AuthenticationHistory

GetUserByID() public method

Gets a user by identity.
public GetUserByID ( System.Guid userId ) : User
userId System.Guid The unique identity.
return User

GetUserByName() public method

Gets a user by name.
public GetUserByName ( string name ) : User
name string The unique sign in name.
return User

GetUserSalt() protected method

Gets a user's salt metadata.
protected GetUserSalt ( System.Guid userId ) : UserSalt
userId System.Guid
return UserSalt

GetUserSession() protected method

Gets a user session by the renewal token.
protected GetUserSession ( System.Guid renewalToken ) : UserSession
renewalToken System.Guid
return UserSession

Initialize() public method

Initializes the provider from the configuration values.
public Initialize ( string name, NameValueCollection config ) : void
name string The name of this provider instance.
config System.Collections.Specialized.NameValueCollection The configuration values.
return void

InsertUserHistory() protected method

Inserts a new user authentication history.
protected InsertUserHistory ( AuthenticationHistory history ) : void
history AuthenticationHistory
return void

SaveUser() protected method

Saves a user, insert or update.
protected SaveUser ( User user ) : void
user User
return void

SaveUserSalt() protected method

Saves a user salt, insert or update.
protected SaveUserSalt ( UserSalt salt ) : void
salt UserSalt
return void

SaveUserSession() protected method

Saves a user session, insert or update.
protected SaveUserSession ( UserSession session ) : void
session UserSession
return void

UserProvider() public method

Creates a new instance.
public UserProvider ( ) : System
return System

UserProvider() public method

Creates a new isntance with a specific name. No initialization.
public UserProvider ( String name ) : System
name String
return System

UserProvider() public method

Creates a new instance with a specific name and a single named connection used for all operations.
public UserProvider ( String name, String connectionName ) : System
name String A name for this provider instance, unique for all User Providers.
connectionName String A table storage connection named defined in configuration.
return System

UserProvider() public method

Creates a new instance with a separate named connections for each secure area.
public UserProvider ( String name, String connectionName, String connectionNameUser, String connectionNameUserSalt, String connectionNameAudit ) : System
name String A name for this provider instance, unique for all User Providers.
connectionName String A table storage connection named defined in configuration; only used if one of the other named connections is not specified.
connectionNameUser String A table storage connection named defined in configuration; used for the user table only.
connectionNameUserSalt String A table storage connection named defined in configuration; used for storing user salts only.
connectionNameAudit String A table storage connection named defined in configuration; used for audit tables.
return System