Show / Hide Table of Contents

Class AssociateResolver

Inheritance
object
AssociateResolver
SoCredentialsIdentityResolver
SoImpersonationIdentityResolver
UserNameIdentityResolver
Implements
ISoIdentityResolver
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Security.Principal
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
Type Name Description
string associateName
SoConnection dbConnection
Returns
Type Description
Task<(int associateId, string associate, AssociateType associateType)>

ResolveFromUsernamePasswordAsync(string, string, SoConnection, string)

Declaration
protected Task<(string associate, int associateId, int credId)> ResolveFromUsernamePasswordAsync(string associate, string password, SoConnection dbConnection, string credentialType)
Parameters
Type Name Description
string associate
string password
SoConnection dbConnection
string credentialType
Returns
Type Description
Task<(string associate, int associateId, int credId)>

ResolveIdentityAsync(IEnumerable<ClaimsIdentity>, SoConnection)

Declaration
public abstract Task<(ClaimsIdentity claims, string reason)> ResolveIdentityAsync(IEnumerable<ClaimsIdentity> identities, SoConnection dbConnection)
Parameters
Type Name Description
IEnumerable<ClaimsIdentity> identities
SoConnection dbConnection
Returns
Type Description
Task<(ClaimsIdentity claims, string reason)>

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
Type Description
string

SecretFromPassword(int, string, string)

Declaration
public static string SecretFromPassword(int associateId, string password, string centralDbTag)
Parameters
Type Name Description
int associateId
string password
string centralDbTag
Returns
Type Description
string

UpdateCredentialsLastUsedAsync(CredentialsTableInfo, int, SoConnection, DateTime)

Declaration
protected static Task UpdateCredentialsLastUsedAsync(CredentialsTableInfo cti, int credId, SoConnection dbConnection, DateTime validTo)
Parameters
Type Name Description
CredentialsTableInfo cti
int credId
SoConnection dbConnection
DateTime validTo
Returns
Type Description
Task

Implements

ISoIdentityResolver

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top