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(int, 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
Properties
CanCreatePerson
Can the plugin create a person (that can be the bases for a user)
Declaration
bool CanCreatePerson { get; }
Property Value
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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(int, 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 |
---|---|
bool |
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 |
---|---|
bool | True if the plugin can handle the |
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 |
---|---|
bool | 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(int, 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 |
---|---|---|
int | 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, int)
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 |
int | personId | PersonId if the user type is a person |
Returns
Type | Description |
---|---|
int |
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 |
---|---|
bool |
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 |
---|---|
bool | 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. |