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 |
---|---|
System.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 |
---|---|
System.String |
IsUserNameSupported
Does this plugin support the associate user name field?
Declaration
bool IsUserNameSupported { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
AddDefaultCredentialsToUser(SoUser)
Declaration
void AddDefaultCredentialsToUser(SoUser user)
Parameters
Type | Name | Description |
---|---|---|
SoUser | user |
CanChangePassword(CredentialsRow)
Is this plugin able to change password for the current
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 |
---|---|---|
SuperOffice.License.UserType | userType |
Returns
Type | Description |
---|---|
Boolean | 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 |
---|---|
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. |
System.String | oldPassword | The old password to change from. This must be the current calid password. |
System.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 |
---|---|---|
System.Int32 | contactId | Contact id for the person to create. |
System.String | value | This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory. |
System.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 |
---|---|---|
System.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 |
---|---|---|
System.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 |
---|---|---|
System.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 |
---|---|---|
SuperOffice.License.UserType | userType | Type of user |
System.Int32 | personId | PersonId if the user type is a person |
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.String | The value displayed to the user. this will typically be the users login name in active directory. |
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 |
---|---|
System.String | This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory. |
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. |
System.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. |
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. |
System.String | associateName | SuperOffice user-name of the user. |
System.String | value | This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory. |
System.String | displayValue | The value displayed to the user. this will typically be the users login name in active directory. |