Class AssociateResolver
Inheritance
AssociateResolver
Assembly: SoDataBase.dll
Syntax
public abstract class AssociateResolver : Object, ISoIdentityResolver, IPlugin
Constructors
AssociateResolver()
Declaration
protected AssociateResolver()
Methods
GetInfoAboutUser()
Obtain operating-system user and process information, as far as possible. Assumes these things do
not change during execution - which is MUCH better than hammering GetCurrentProcess
umpteen times per second (yes, we've had incidents).
Declaration
public static string GetInfoAboutUser()
Returns
Type |
Description |
String |
String that will go into the credentials table row, purely as information
|
IsPasswordValid(Int32, String, String)
Check if this is a valid password.
Declaration
public static bool IsPasswordValid(int associateId, string password, string secret)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
Associate if to check password for.
|
String |
password |
Password to check if it is valid.
|
String |
secret |
Secret holding hashed password to check if it is valid
|
Returns
Type |
Description |
Boolean |
True of this is a valid password.
|
ResolveAssociateFromName(ref String, out AssociateType, SoConnection)
Declaration
protected int ResolveAssociateFromName(ref string associate, out AssociateType associateType, SoConnection dbConnection)
Parameters
Returns
ResolveFromUsernamePassword(ref String, String, SoConnection, String, out Int32)
Declaration
protected int ResolveFromUsernamePassword(ref string associate, string password, SoConnection dbConnection, string credentialType, out int credId)
Parameters
Returns
ResolveIdentity(IEnumerable<ClaimsIdentity>, SoConnection, out String)
Declaration
public abstract ISoIdentity ResolveIdentity(IEnumerable<ClaimsIdentity> identities, SoConnection dbConnection, out string reason)
Parameters
Returns
SecretFromPassword(Int32, String)
Construct the 'secret' string as a hash of passowrd, dbtag and associate id
Declaration
public static string SecretFromPassword(int associateId, string password)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
|
String |
password |
|
Returns
SecretFromPassword(Int32, String, String)
Declaration
public static string SecretFromPassword(int associateId, string password, string centralDbTag)
Parameters
Returns
UpdateCredentialsLastUsed(CredentialsTableInfo, Int32, SoConnection, DateTime)
Declaration
protected static void UpdateCredentialsLastUsed(CredentialsTableInfo cti, int credId, SoConnection dbConnection, DateTime validTo)
Parameters
UpdateRoleId(Int32, Int32)
Update the role id (as part of authentication)
Declaration
protected static void UpdateRoleId(int associateId, int roleIdx)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
AssociateId being authenticated.
|
Int32 |
roleIdx |
New roleId of the associate.
|
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)