Show / Hide Table of Contents

Interface IUserCredentialPlugin

Interface implemented by UserCredential Plug-ins, responsible for adding credentials to a user. Adding a new user from a plugin will use the CreatePerson(Int32, String, String) method to create a new person and consequent default values will be used to create the user. The credentials will finally be mapped to the user

Namespace: SuperOffice.CRM.Administration
Assembly: SoDataBase.dll
Syntax
public interface IUserCredentialPlugin : IPlugin

Properties

CanCreatePerson

Can the plugin create a person (that can be the bases for a user)

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

ControlType

Type of control used to display the value.

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

Description

Description of the authentication type. This value is used in a list of authentication providers that can be choosen by an end user and should be a fairly describtive text. This will typically be SuperOffice is responsible for username and password for a password scenario.

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

DisplayType

The name of the credentials to be displayed in the user interface.
This will typically be Password for user-name/password scenarios and Active Directoru User for AD integration.

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

IsUserNameSupported

Does this plugin support the associate user name field?

Declaration
bool IsUserNameSupported { get; }
Property Value
Type Description
Boolean

Methods

AddDefaultCredentialsToUser(SoUser)

Interface implemented by UserCredential Plug-ins, responsible for adding credentials to a user. Adding a new user from a plugin will use the CreatePerson(Int32, String, String) method to create a new person and consequent default values will be used to create the user. The credentials will finally be mapped to the user

Declaration
void AddDefaultCredentialsToUser(SoUser user)
Parameters
Type Name Description
SoUser user

CanChangePassword(CredentialsRow)

Is this plugin able to change password for the current credential

Declaration
bool CanChangePassword(CredentialsRow row)
Parameters
Type Name Description
CredentialsRow row

Information about the credential.

Returns
Type Description
Boolean
Remarks

True if the plugin is able to change password.

CanHandle(UserType)

Check if the plugin can handle credentials for SuperOffice.License.UserType.

Declaration
bool CanHandle(UserType userType)
Parameters
Type Name Description
UserType userType
Returns
Type Description
Boolean

True if the plugin can handle the userType

CanValidatePassword(CredentialsRow)

Is the plugin able to validfate the password.

Declaration
bool CanValidatePassword(CredentialsRow row)
Parameters
Type Name Description
CredentialsRow row

Information about the credential.

Returns
Type Description
Boolean

True if it is possible to validate the password.

ChangePassword(CredentialsRow, String, String)

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

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

Information about the credential.

String oldPassword

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

String newPassword

The new password to change to.

CreatePerson(Int32, String, String)

Create Person and return person id of the person created

Declaration
Person CreatePerson(int contactId, string value, string displayValue)
Parameters
Type Name Description
Int32 contactId

Contact id for the person to create.

String value

This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory.

String displayValue

The value displayed to the user. this will typically be the users login name in active directory.

Returns
Type Description
Person

Primary key of the person created

FindCredentialUsers(String)

Find users mathcing the partial name.

Declaration
UserCredentialList FindCredentialUsers(string searchString)
Parameters
Type Name Description
String searchString

Partly name of the user group

Returns
Type Description
UserCredentialList

FindGroups(String)

Get user groups holding users. This method is only relevant if the CredentialType control is of type link. There will allways be at least one groups even if the underlying provider does not support groups.

Declaration
UserCredentialGroup[] FindGroups(string searchString)
Parameters
Type Name Description
String searchString

Partly name of domain group.

Returns
Type Description
UserCredentialGroup[]

GetCredentialUsersInGroup(String)

Get credential users within a user group

Declaration
UserCredentialList GetCredentialUsersInGroup(string groupName)
Parameters
Type Name Description
String groupName

Name of user group needed to discover the users.

Returns
Type Description
UserCredentialList

GetDefaultPriority(UserType, Int32)

Get default priority for plugin. Highest number will be the default plugin. Password will by default be 0 as a base-line

Declaration
int GetDefaultPriority(UserType userType, int personId)
Parameters
Type Name Description
UserType userType

Type of user

Int32 personId

PersonId if the user type is a person

Returns
Type Description
Int32

GetDisplayValue(CredentialsRow)

Get the display value of the user.

Declaration
string GetDisplayValue(CredentialsRow row)
Parameters
Type Name Description
CredentialsRow row

The credential row to get the value from.

Returns
Type Description
String

The value displayed to the user. this will typically be the users login name in active directory.

GetSupportedChangePasswordTypes(CredentialsRow)

Returns a list of the types of password changes that is allowed for this credential. Returns empty array if no type is supported.

Declaration
ChangePasswordType[] GetSupportedChangePasswordTypes(CredentialsRow row)
Parameters
Type Name Description
CredentialsRow row
Returns
Type Description
ChangePasswordType[]

GetValue(CredentialsRow)

Get value (key) to the user in the foreign system. This can also be the password.

Declaration
string GetValue(CredentialsRow row)
Parameters
Type Name Description
CredentialsRow row

The credential row to get the value from.

Returns
Type Description
String

This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory.

IsPasswordLegal(SoUser, String, out String)

Check if a password is legal meaning it comply with the configured password policy for this provider. Implementations must return true if there is no policy checks to be done.

Declaration
bool IsPasswordLegal(SoUser user, string password, out string reason)
Parameters
Type Name Description
SoUser user
String password
String reason
Returns
Type Description
Boolean

IsPasswordValid(CredentialsRow, String)

Check if password is valid.

Declaration
bool IsPasswordValid(CredentialsRow row, string password)
Parameters
Type Name Description
CredentialsRow row

Information about the credential.

String password

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

Returns
Type Description
Boolean

True if the right password is passed in.

SendChangePasswordEmail(CredentialsRow)

Send an email the user cna use to change password.

Declaration
void SendChangePasswordEmail(CredentialsRow row)
Parameters
Type Name Description
CredentialsRow row

UpdateCredentialsRow(CredentialsRow, String, String, String)

Update credential row.

Declaration
void UpdateCredentialsRow(CredentialsRow row, string associateName, string value, string displayValue)
Parameters
Type Name Description
CredentialsRow row

The credentials row to apply the values on.

String associateName

SuperOffice user-name of the user.

String value

This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory.

String displayValue

The value displayed to the user. this will typically be the users login name in active directory.

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