Class AssociateResolver
Inheritance
AssociateResolver
Assembly: SoDataBase.dll
Syntax
public abstract class AssociateResolver : ISoIdentityResolver
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(int, string, string)
Check if this is a valid password.
Declaration
public static bool IsPasswordValid(int associateId, string password, string secret)
Parameters
Type |
Name |
Description |
int |
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 |
bool |
True of this is a valid password.
|
ResolveAssociateFromNameAsync(string, SoConnection)
Declaration
protected Task<(int associateId, string associate, AssociateType associateType)> ResolveAssociateFromNameAsync(string associateName, SoConnection dbConnection)
Parameters
Returns
ResolveFromUsernamePasswordAsync(string, string, SoConnection, string)
Declaration
protected Task<(string associate, int associateId, int credId)> ResolveFromUsernamePasswordAsync(string associate, string password, SoConnection dbConnection, string credentialType)
Parameters
Returns
ResolveIdentityAsync(IEnumerable<ClaimsIdentity>, SoConnection)
Declaration
public abstract Task<(ClaimsIdentity claims, string reason)> ResolveIdentityAsync(IEnumerable<ClaimsIdentity> identities, SoConnection dbConnection)
Parameters
Returns
SecretFromPassword(int, 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 |
int |
associateId |
|
string |
password |
|
Returns
SecretFromPassword(int, string, string)
Declaration
public static string SecretFromPassword(int associateId, string password, string centralDbTag)
Parameters
Returns
UpdateCredentialsLastUsedAsync(CredentialsTableInfo, int, SoConnection, DateTime)
Declaration
protected static Task UpdateCredentialsLastUsedAsync(CredentialsTableInfo cti, int credId, SoConnection dbConnection, DateTime validTo)
Parameters
Returns
Implements
Extension Methods