Show / Hide Table of Contents

Interface ICredentialsManager

Namespace: SuperOfficeSecurity
Assembly: SoDataBase.dll
Syntax
public interface ICredentialsManager

Methods

GetAllInstalledPluginNames()

Return a list of all credential plugins that are available (including those that . i.e. all plugins that are installed are returned, including those without a corresponding license.

Declaration
string[] GetAllInstalledPluginNames()
Returns
Type Description
string

List of all ICredntialPlugin names e.g: "ActiveDirectory", "CRM5/PASSWORD"

GetAllPlugins()

Return a list of all credential plugins that are licensed and available. i.e. some plugins that are installed may not be present, because the corresponding license is not present.

Declaration
Dictionary<string, IUserCredentialPlugin> GetAllPlugins()
Returns
Type Description
DictionarystringIUserCredentialPlugin

Dictionary of plugin name to plugin instance. e.g: "ActiveDirectory"=ActiveDirectoryCredentialPlugin

GetDefaultCredentialPlugin(UserType, int)

Declaration
IUserCredentialPlugin GetDefaultCredentialPlugin(UserType userType, int personId)
Parameters
Type Name Description
SuperOffice.License.UserType userType
int personId
Returns
Type Description
IUserCredentialPlugin

GetPlugin(string)

Get the plugin associated with a given credential type.

Declaration
IUserCredentialPlugin GetPlugin(string credentialType)
Parameters
Type Name Description
string credentialType

Name of credential plugin: "CRM5/PASSWORD" or "ActiveDirectory".

Returns
Type Description
IUserCredentialPlugin

Plugin interface, or null if plugin is not available/licensed.

GetUntrustedCredentialsAsync(string, int, CancellationToken)

Get a set of credentials for a specified associate

Declaration
Task<UntrustedCredentials[]> GetUntrustedCredentialsAsync(string type, int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string type

Type of credentials to retrieve

int associateId

Id of associate to retrieve credentials for

CancellationToken cancellationToken
Returns
Type Description
TaskUntrustedCredentials

Arrow of populated credential objects. SecretValue is left blank for security purposes if associate is not authenticated user or a system user.

GetUntrustedCredentialsAsync(string, CancellationToken)

Get a set of credentials for authenticated associate

Declaration
Task<UntrustedCredentials[]> GetUntrustedCredentialsAsync(string type, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string type

Type of credentials to retrieve

CancellationToken cancellationToken
Returns
Type Description
TaskUntrustedCredentials

Arrow of populated credential objects.

Refresh()

Refresh the list of credential plugins. Useful if you have just loaded some new licenses.

Declaration
void Refresh()

RemoveUntrustedCredentialsAsync(string, int, string, CancellationToken)

Remove a credentials entry for an associate

Declaration
Task RemoveUntrustedCredentialsAsync(string type, int associateId, string publicValue, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string type

Type of credential(Ex: "imap", "smtp")

int associateId

Id of associate to remove for

string publicValue

PublicValue of credential to remove

CancellationToken cancellationToken
Returns
Type Description
Task

RemoveUntrustedCredentialsAsync(string, string, CancellationToken)

Remove a credentials entry for authenticated user

Declaration
Task RemoveUntrustedCredentialsAsync(string type, string publicValue, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string type

Type of credential(Ex: "imap", "smtp")

string publicValue

PublicValue of credential to remove

CancellationToken cancellationToken
Returns
Type Description
Task

SaveUntrustedCredentialsAsync(string, UntrustedCredentials, CancellationToken)

Save credentials for authenticated associate

Declaration
Task SaveUntrustedCredentialsAsync(string type, UntrustedCredentials credentials, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string type

Type of credential(Ex: "imap", "smtp")

UntrustedCredentials credentials

Credentials to save

CancellationToken cancellationToken
Returns
Type Description
Task

SaveUntrustedCredentialsAsync(string, int, UntrustedCredentials, CancellationToken)

Save credentials for a specified associate

Declaration
Task SaveUntrustedCredentialsAsync(string type, int associateId, UntrustedCredentials credentials, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string type

Type of credential(Ex: "imap", "smtp")

int associateId

Id of associate to save for

UntrustedCredentials credentials

Credentials to save

CancellationToken cancellationToken
Returns
Type Description
Task

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