Show / Hide Table of Contents

Class SoUserCredential

Inheritance
object
NestedPersist
NestedPersistFacade
SoUserCredential
Implements
INestedPersist
Inherited Members
NestedPersistFacade.IsDirty
NestedPersist.SetSaveOwner(INestedPersist)
NestedPersist.SaveAsync()
NestedPersist.IsSaving
NestedPersist.OnElementSaved
NestedPersist.OnElementIdUpdate
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.CRM.Administration
Assembly: SoDataBase.dll
Syntax
public sealed class SoUserCredential : NestedPersistFacade, INestedPersist

Constructors

SoUserCredential(CredentialsRow)

Declaration
public SoUserCredential(CredentialsRow row)
Parameters
Type Name Description
CredentialsRow row

SoUserCredential(string)

Declaration
public SoUserCredential(string credentialType)
Parameters
Type Name Description
string credentialType

Properties

CanCreatePerson

Declaration
public bool CanCreatePerson { get; }
Property Value
Type Description
bool

CanValidatePassword

Is the plugin able to validfate the password.

Declaration
public bool CanValidatePassword { get; }
Property Value
Type Description
bool

True if it is possible to validate the password.

ControlType

Declaration
public CredentialControlType ControlType { get; }
Property Value
Type Description
CredentialControlType

Description

Declaration
public string Description { get; }
Property Value
Type Description
string

DisplayType

Declaration
public string DisplayType { get; }
Property Value
Type Description
string

DisplayValue

Declaration
public string DisplayValue { get; set; }
Property Value
Type Description
string

IsDeleted

Gets a value indicating whether this instance is deleted.

Declaration
public override bool IsDeleted { get; }
Property Value
Type Description
bool

true if this instance is deleted; otherwise, false.

Overrides
NestedPersist.IsDeleted

IsMarkedForDelete

Gets or sets a value indicating whether this instance is marked for delete.

Declaration
public override bool IsMarkedForDelete { get; set; }
Property Value
Type Description
bool

true if this instance is marked for delete; otherwise, false.

Overrides
NestedPersist.IsMarkedForDelete

Plugin

Declaration
public IUserCredentialPlugin Plugin { get; }
Property Value
Type Description
IUserCredentialPlugin

Row

Declaration
public CredentialsRow Row { get; }
Property Value
Type Description
CredentialsRow

Type

Declaration
public string Type { get; }
Property Value
Type Description
string

Value

Declaration
public string Value { get; set; }
Property Value
Type Description
string

Methods

ChangePassword(string, string)

Changes the account password from the old password to the new password.

Declaration
public void ChangePassword(string oldPassword, string newPassword)
Parameters
Type Name Description
string oldPassword

The old password to change from. This must be the current calid password.

string newPassword

The new password to change to.

GetCanChangePasswordAsync(CancellationToken)

Is this plugin able to change password for the current

Declaration
public Task<bool> GetCanChangePasswordAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

GetCanSendChangePasswordMailAsync(CancellationToken)

Is this plugin able to send a change password email for the current

Declaration
public Task<bool> GetCanSendChangePasswordMailAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

GetFacadingItems()

Implement this method to expose items that needs to be persisted.

Declaration
protected override IEnumerable<INestedPersist> GetFacadingItems()
Returns
Type Description
IEnumerable<INestedPersist>

Collection of items that needs to be persisted.

Overrides
NestedPersistFacade.GetFacadingItems()

GetSupportedChangePasswordTypesAsync(CancellationToken)

Returns the change password types supported by this plugin

Declaration
public Task<ChangePasswordType[]> GetSupportedChangePasswordTypesAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<ChangePasswordType[]>

IsPasswordLegal(SoUser, string, out string)

Declaration
public bool IsPasswordLegal(SoUser soUser, string value, out string reason)
Parameters
Type Name Description
SoUser soUser
string value
string reason
Returns
Type Description
bool

IsPasswordValid(string)

Check if password is valid.

Declaration
public bool IsPasswordValid(string password)
Parameters
Type Name Description
string password

The password to check if if it is valid (e.g. that means that this is the current password.)

Returns
Type Description
bool

True if the right password is passed in.

OnPreIdUpdateAsync()

Allow for "fake id's" to be forced upon related objects.

Declaration
protected override Task OnPreIdUpdateAsync()
Returns
Type Description
Task
Overrides
NestedPersistFacade.OnPreIdUpdateAsync()
Remarks

In order to figure out which objects taking part of the nested save operation that actually needs to be saved, this method allows for "fake id's" to be forced upon related objects. Upon receiving the "fake id", the objects receiving such an id can determine if they needs to be persisted (e.g. saved) to the database. However, the fake id's forced upon related objects must be set to correct id's in the OnIdUpdate method taking place later in the save operation.

SendChangePasswordEmailAsync()

Send a change password email to the current

Declaration
public Task SendChangePasswordEmailAsync()
Returns
Type Description
Task

Implements

INestedPersist

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