SCIMDesktop Class

Properties   Methods   Events   Config Settings   Errors  

The SCIMDesktop class provides an easy way to add automatic user and group provisioning to your desktop application.

Syntax

SCIMDesktop

Remarks

The System for Cross-domain Identity Management (SCIM) protocol gives an Identity Provider (e.g., Okta or Microsoft Entra ID) a standardized way to automatically create, update, and deactivate accounts in your application. Instead of an administrator manually managing an account in every connected application, SCIM lets the Identity Provider push those changes out over a simple REST/JSON API whenever a user is hired, changes departments, or leaves the company.

The Identity Provider acts as the client, and your application is the SCIM service provider. This class implements the service provider role. It listens for incoming HTTP connections, parses each SCIM request, fires an event so your application can create, look up, update, or delete the corresponding record in its own data store, and then builds and sends the SCIM JSON response.

Unlike the SCIMWeb class, which is embedded within an existing web application or framework, this class hosts its own embedded HTTP server, so no external web server is required. This makes it well suited to a desktop application or background service that needs to expose a SCIM endpoint on its own.

Setup

The LocalHost and LocalPort properties are used to control the address and port the embedded server listens on. The StartListening method must be called to begin actively listening for incoming connections.

The MaxConnections and IdleTimeout properties may be used to control how many simultaneous connections are accepted and how long an idle connection is kept open, respectively. To expose the endpoint over HTTPS, the SSLEnabled property may be enabled alongside the specification of a certificate via the SSLCert property before calling StartListening.

scim.LocalHost = "127.0.0.1"; scim.LocalPort = 8443; scim.SSLCert = new Certificate(CertStoreTypes.cstPFXFile, "cert.pfx", "password", "*"); scim.SSLEnabled = true; scim.StartListening();

The class may also be configured with information about which SCIM operations to support and how requests should be routed. The BaseURL property is the path prefix used to recognize SCIM resource paths, and the SupportedOperations property is a bitmask that controls which combinations of HTTP method and resource type are accepted. The MaxResults property dictates how many resources can be returned from a single list request.

scim.BaseURL = "/scim/v2"; scim.SupportedOperations = SupportedOperations.sopAll; scim.MaxResults = 200;

Authentication

Every incoming request fires the AuthRequest event before any resource-specific event is raised, giving the application the chance to accept or reject the request. The AuthMethod parameter identifies the scheme supplied by the client, detailed below.

BearerThe scheme used by most Identity Provider integrations. The Token parameter contains the raw bearer token. If the AuthToken property has been set, the class automatically compares it against the incoming token and pre-initializes the Accept parameter with the result, so a simple deployment does not need an AuthRequest handler at all.
BasicThe class decodes the credentials and provides the username and password through the User and Token parameters. No automatic comparison is performed.
Other/UnrecognizedThe Accept parameter defaults to false and the application must explicitly accept the request from within an AuthRequest handler.
"" (empty string)No Authorization header was present. User and Token are both empty and the Accept parameter defaults to false.

The AllowedClients and BlockedClients configuration settings may be used if connections should be restricted at the network level as well.

A static bearer token may be supplied to the class as shown.

scim.AuthToken = "the-token-issued-to-your-identity-provider";

Alternatively, custom validation may be performed as shown.

scim.OnAuthRequest += (sender, e) => { e.Accept = e.AuthMethod == "Bearer" && tokenStore.IsValid(e.Token); };

User Management

The class fires an event for each standard SCIM user operation, giving the application full control over how users are stored.

Creating a User

A POST /Users request causes the CreateUser event to be fired with the submitted attributes, including any addresses and phone numbers through the UserEmails and UserPhones collections and enterprise attributes (department, employee number, manager, and so on) through the UserExtension property. The handler must assign and return a unique UserId and set the StatusCode parameter to 201.

Retrieving and Listing Users

A GET /Users/{id} request causes the GetUser event to be fired. The handler populates the user's current attributes and the AddUserEmail, AddUserPhone, and AddUserExtension methods may be called to include any related data.

A GET /Users request causes the ListUsers event to be fired instead, with pagination reflected in the StartIndex and Count parameters and, for simple single-term filters such as userName eq "jsmith", the parsed FilterAttribute, FilterOperator, and FilterValue parameters. The AddUser method should be called once per matching user, and the TotalResults parameter should be set to the total across all pages.

scim.OnListUsers += (sender, e) => { var page = db.QueryUsers(e.FilterAttribute, e.FilterOperator, e.FilterValue, e.StartIndex - 1, e.Count); foreach (var user in page.Results) { scim.AddUser(user.Id, user.UserName, user.DisplayName, user.ExternalId, user.Active); } e.TotalResults = page.TotalCount; e.StatusCode = 200; };

Updating and Deleting Users

Both PUT /Users/{id} and PATCH /Users/{id} requests cause the UpdateUser event to be fired. For a PATCH request, the class first fires the GetUser event to load the current record, applies the patch operations from the request (including path-filtered operations such as emails[type eq "work"]) internally, and then fires the UpdateUser event with the fully merged result, so the handler always sees a complete, final representation of the user regardless of which method was used. The read-only RequestType property should be used if the handler needs to distinguish which method triggered the current event.

A DELETE /Users/{id} request causes the DeleteUser event to be fired. Deactivating a user without deleting their record is done the standard SCIM way, by setting the Active parameter to false through an update rather than issuing a delete.

Group Management

Groups follow the same pattern as users, and the CreateGroup, GetGroup, ListGroups, UpdateGroup, and DeleteGroup events all mirror their user counterparts. Group members are provided through the GroupMembers collection on create and update, and are added to an outgoing response with the AddGroupMember method. The AddGroup method is used to add each group to a ListGroups event response.

Discovery Endpoints

The class automatically answers the standard SCIM discovery endpoints so an Identity Provider can inspect your service provider's capabilities before provisioning begins.

A GET /ServiceProviderConfig request, which causes the GetServiceProviderConfig event to be fired, advertises the supported authentication scheme and which operations are enabled, based on the SupportedOperations property. GET /ResourceTypes requests, which cause the GetResourceTypes event to be fired, and GET /Schemas requests, which cause the GetSchemas event to be fired, describe the User and Group resource and schema definitions, including the enterprise user extension. All three events are informational, so the response body has already been generated by the time each one fires.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

AuthTokenThe Bearer token used to authenticate incoming SCIM requests.
BaseURLThe base URL path for SCIM endpoints.
ConnectionBacklogThis property includes the maximum number of pending connections maintained by the Transmission Control Protocol (TCP)/IP subsystem.
GroupMembersA collection of members for the current group.
IdleTimeoutThe number of seconds before an idle connection is closed.
ListeningThis property indicates whether the class is listening for incoming connections on LocalPort.
LocalHostThe address on which the embedded HTTP server listens.
LocalPortThe port on which the embedded HTTP server listens.
MaxConnectionsThe maximum number of simultaneous connections the server will accept.
MaxResultsThe maximum number of resources requested from the application in a single list request.
RequestTypeThe HTTP method of the request currently being processed.
SSLAuthenticateClientsIf set to True, the server asks the client(s) for a certificate.
SSLCertThe certificate to be used during Secure Sockets Layer (SSL) negotiation.
SSLEnabledThis property indicates whether Transport Layer Security/Secure Sockets Layer (TLS/SSL) is enabled.
SSLProviderThe Secure Sockets Layer/Transport Layer Security (SSL/TLS) implementation to use.
SupportedOperationsA bitmask that controls which SCIM operations the class accepts.
UserEmailsA collection of email addresses for the current inbound user.
UserExtensionThe enterprise extension attributes for the current inbound user.
UserPhonesA collection of phone numbers for the current inbound user.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

AddGroupAdds a group entry to the outgoing list response.
AddGroupMemberAdds a member to the outgoing group response.
AddUserAdds a user entry to the outgoing list response.
AddUserEmailAdds an email address to the outgoing user response.
AddUserExtensionAdds enterprise extension attributes to the outgoing user response.
AddUserPhoneAdds a phone number to the outgoing user response.
ConfigSets or retrieves a configuration setting.
DisconnectThis method disconnects the specified client.
DoEventsThis method processes events from the internal message queue.
ResetThis method will reset the class.
ShutdownThis method shuts down the server.
StartListeningThis method starts listening for incoming connections.
StopListeningThis method stops listening for new connections.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

AuthRequestFired for every incoming request to control access to specific endpoints.
ConnectedThis event is fired immediately after a connection completes (or fails).
ConnectionRequestThis event is fired when a request for connection comes from a remote host.
CreateGroupFired when a request to create a new group is received.
CreateUserFired when a request to create a new user is received.
DeleteGroupFired when a request to delete a group is received.
DeleteUserFired when a request to delete a user is received.
DisconnectedThis event is fired when a connection is closed.
ErrorThis event fires information about errors during data delivery.
GetGroupFired when a request to retrieve a group is received, before a PATCH group update, or when ETags are enabled and a PUT or DELETE request includes an If-Match header.
GetResourceTypesFired when a request for the resource type definitions is received.
GetSchemasFired when a request for the schema definitions is received.
GetServiceProviderConfigFired when a request for the service provider configuration is received.
GetUserFired when a request to retrieve a user is received, before a PATCH user update, or when ETags are enabled and a PUT or DELETE request includes an If-Match header.
ListGroupsFired when a request to list groups is received.
ListUsersFired when a request to list users is received.
LogFired once for each log message.
SSLClientAuthenticationThis event is fired when the client presents its credentials to the server.
SSLConnectionRequestThis event fires when a Secure Sockets Layer (SSL) connection is requested.
SSLStatusThis event is fired to show the progress of the secure connection.
UpdateGroupFired after the current group has been loaded and a replace or update request has been applied.
UpdateUserFired after the current user has been loaded and a replace or update request has been applied.

Config Settings


The following is a list of config settings for the class with short descriptions. Click on the links for further details.

AllowedClientsA comma-separated list of IP addresses or hostnames allowed to connect.
BlockedClientsA comma-separated list of IP addresses or hostnames that are denied connections.
ETagEnabledWhether to include ETag headers in user and group responses.
IgnoreUnknownPatchAttributesWhether to ignore PATCH operations that target unsupported attributes.
LogLevelControls the level of detail that is logged through the Log event.
RequestBodyThe body of the most recently received SCIM request.
UseIPv6Controls IPv4/IPv6 listening behavior.
XChildCountThe number of child elements of the current JSON element.
XChildName[i]The name of a child JSON element.
XChildXText[i]The text of a child JSON element.
XElementThe name of the current JSON element.
XParentThe parent of the current JSON element.
XPathSelects an element in the most recently received SCIM JSON request.
XSubTreeA snapshot of the current JSON element.
XTextThe text of the current JSON element.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
MaskSensitiveDataWhether sensitive data is masked in log messages.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPIWhether or not to use the system security libraries or an internal implementation.

AuthToken Property (SCIMDesktop Class)

The Bearer token used to authenticate incoming SCIM requests.

Syntax

ANSI (Cross Platform)
char* GetAuthToken();
int SetAuthToken(const char* lpszAuthToken); Unicode (Windows) LPWSTR GetAuthToken();
INT SetAuthToken(LPCWSTR lpszAuthToken);
char* cloudsso_scimdesktop_getauthtoken(void* lpObj);
int cloudsso_scimdesktop_setauthtoken(void* lpObj, const char* lpszAuthToken);
QString getAuthToken();
int setAuthToken(QString qsAuthToken);

Default Value

""

Remarks

When this property is set, the class compares the incoming authorization bearer token against its value and initializes the Accept parameter of the AuthRequest event accordingly before the event fires. If the token is missing or does not match, the Accept parameter will be set to false. Likewise, if a match is found, the Accept parameter will be set to true. This value may be overridden in the handler when the AuthRequest event fires (e.g., the handler can reject a matching token to enforce expiry or check a revocation list).

This property only takes effect for Bearer authentication and has no influence on other authentication schemes.

When this property is empty, no automatic comparison is performed and Accept defaults to false. Without an AuthRequest handler that explicitly accepts the request, all incoming requests receive a 401 Unauthorized response.

Data Type

String

BaseURL Property (SCIMDesktop Class)

The base URL path for SCIM endpoints.

Syntax

ANSI (Cross Platform)
char* GetBaseURL();
int SetBaseURL(const char* lpszBaseURL); Unicode (Windows) LPWSTR GetBaseURL();
INT SetBaseURL(LPCWSTR lpszBaseURL);
char* cloudsso_scimdesktop_getbaseurl(void* lpObj);
int cloudsso_scimdesktop_setbaseurl(void* lpObj, const char* lpszBaseURL);
QString getBaseURL();
int setBaseURL(QString qsBaseURL);

Default Value

"/scim/v2"

Remarks

This property defines the base path prefix the class uses when routing incoming requests to SCIM endpoints. All SCIM resource paths are resolved relative to this value (e.g., with the default value of /scim/v2, a request for /scim/v2/Users is recognized as a User list request).

This value must begin with a forward slash. Trailing slashes are removed automatically, so /scim/v2/ and /scim/v2 are equivalent.

Data Type

String

ConnectionBacklog Property (SCIMDesktop Class)

This property includes the maximum number of pending connections maintained by the Transmission Control Protocol (TCP)/IP subsystem.

Syntax

ANSI (Cross Platform)
int GetConnectionBacklog();
int SetConnectionBacklog(int iConnectionBacklog); Unicode (Windows) INT GetConnectionBacklog();
INT SetConnectionBacklog(INT iConnectionBacklog);
int cloudsso_scimdesktop_getconnectionbacklog(void* lpObj);
int cloudsso_scimdesktop_setconnectionbacklog(void* lpObj, int iConnectionBacklog);
int getConnectionBacklog();
int setConnectionBacklog(int iConnectionBacklog);

Default Value

5

Remarks

This property contains the maximum number of pending connections maintained by the TCP/IP subsystem. This value reflects the SOMAXCONN option for the main listening socket. The default value for most systems is 5. You may set this property to a larger value if the server is expected to receive a large number of connections, and queuing them is desirable.

This property is not available at design time.

Data Type

Integer

GroupMembers Property (SCIMDesktop Class)

A collection of members for the current group.

Syntax

CloudSSOList<CloudSSOSCIMMember>* GetGroupMembers();
int cloudsso_scimdesktop_getgroupmembercount(void* lpObj);
char* cloudsso_scimdesktop_getgroupmembermemberdisplay(void* lpObj, int groupmemberindex);
char* cloudsso_scimdesktop_getgroupmembermemberid(void* lpObj, int groupmemberindex);
int getGroupMemberCount();

QString getGroupMemberMemberDisplay(int iGroupMemberIndex);

QString getGroupMemberMemberId(int iGroupMemberIndex);

Remarks

This collection holds a list of SCIMMember items.

When the CreateGroup event is fired, this collection is populated with the members provided in the request. When the UpdateGroup event is fired, it is populated with the complete final member list. For a PATCH request, this reflects the group loaded via the GetGroup event with the patch operations applied. For a PUT request, it reflects the member list from the request body directly.

This property is read-only and not available at design time.

Data Type

CloudSSOSCIMMember

IdleTimeout Property (SCIMDesktop Class)

The number of seconds before an idle connection is closed.

Syntax

ANSI (Cross Platform)
int GetIdleTimeout();
int SetIdleTimeout(int iIdleTimeout); Unicode (Windows) INT GetIdleTimeout();
INT SetIdleTimeout(INT iIdleTimeout);
int cloudsso_scimdesktop_getidletimeout(void* lpObj);
int cloudsso_scimdesktop_setidletimeout(void* lpObj, int iIdleTimeout);
int getIdleTimeout();
int setIdleTimeout(int iIdleTimeout);

Default Value

10

Remarks

This property is used to specify how long, in seconds, the embedded server allows a connection to remain idle (i.e., no data sent or received) before closing it.

The default timeout is 10 seconds, and a value of 0 may be provided to disable the timeout.

Data Type

Integer

Listening Property (SCIMDesktop Class)

This property indicates whether the class is listening for incoming connections on LocalPort.

Syntax

ANSI (Cross Platform)
int GetListening();

Unicode (Windows)
BOOL GetListening();
int cloudsso_scimdesktop_getlistening(void* lpObj);
bool getListening();

Default Value

FALSE

Remarks

This property indicates whether the class is listening for connections on the port specified by the LocalPort property. Use the StartListening and StopListening methods to control whether the class is listening.

This property is read-only and not available at design time.

Data Type

Boolean

LocalHost Property (SCIMDesktop Class)

The address on which the embedded HTTP server listens.

Syntax

ANSI (Cross Platform)
char* GetLocalHost();
int SetLocalHost(const char* lpszLocalHost); Unicode (Windows) LPWSTR GetLocalHost();
INT SetLocalHost(LPCWSTR lpszLocalHost);
char* cloudsso_scimdesktop_getlocalhost(void* lpObj);
int cloudsso_scimdesktop_setlocalhost(void* lpObj, const char* lpszLocalHost);
QString getLocalHost();
int setLocalHost(QString qsLocalHost);

Default Value

""

Remarks

This property is used to specify the local interface address on which the embedded HTTP server binds. The default is "" (empty string), which causes the server to listen on all available interfaces.

This property should be set to a specific IP address to restrict the server to a single network interface (e.g., 127.0.0.1 to accept only local connections).

Data Type

String

LocalPort Property (SCIMDesktop Class)

The port on which the embedded HTTP server listens.

Syntax

ANSI (Cross Platform)
int GetLocalPort();
int SetLocalPort(int iLocalPort); Unicode (Windows) INT GetLocalPort();
INT SetLocalPort(INT iLocalPort);
int cloudsso_scimdesktop_getlocalport(void* lpObj);
int cloudsso_scimdesktop_setlocalport(void* lpObj, int iLocalPort);
int getLocalPort();
int setLocalPort(int iLocalPort);

Default Value

80

Remarks

This property is used to specify the TCP port on which the server accepts SCIM requests. The default is 80, and it must be set before calling the StartListening method.

This property should be set to 0 to cause the system to choose a random available port. After StartListening is called, this property may be queried to read the actual port assigned.

When the SSLEnabled property is enabled, the server automatically listens for TLS connections. If this property is still at its default of 80 when SSLEnabled is toggled, the port switches to 443 automatically. If a non-default port has already been set, it is not changed.

This property is not available at design time.

Data Type

Integer

MaxConnections Property (SCIMDesktop Class)

The maximum number of simultaneous connections the server will accept.

Syntax

ANSI (Cross Platform)
int GetMaxConnections();
int SetMaxConnections(int iMaxConnections); Unicode (Windows) INT GetMaxConnections();
INT SetMaxConnections(INT iMaxConnections);
int cloudsso_scimdesktop_getmaxconnections(void* lpObj);
int cloudsso_scimdesktop_setmaxconnections(void* lpObj, int iMaxConnections);
int getMaxConnections();
int setMaxConnections(int iMaxConnections);

Default Value

100000

Remarks

This property controls how many concurrent connections the embedded server will maintain. An incoming connection attempt beyond this limit is accepted and immediately closed.

The default, and maximum supported, value is 100,000. Unlike LocalHost and LocalPort, this property may be changed at any time, even while the server is listening. The new limit applies to subsequent connection attempts.

Data Type

Integer

MaxResults Property (SCIMDesktop Class)

The maximum number of resources requested from the application in a single list request.

Syntax

ANSI (Cross Platform)
int GetMaxResults();
int SetMaxResults(int iMaxResults); Unicode (Windows) INT GetMaxResults();
INT SetMaxResults(INT iMaxResults);
int cloudsso_scimdesktop_getmaxresults(void* lpObj);
int cloudsso_scimdesktop_setmaxresults(void* lpObj, int iMaxResults);
int getMaxResults();
int setMaxResults(int iMaxResults);

Default Value

200

Remarks

This property limits the Count parameter of the ListUsers and ListGroups events. When the Identity Provider omits the count query parameter or requests more results than this value, Count is set to this value. The class does not remove resources from the response, so the event handler should add no more than Count resources.

This value is also reported in the ServiceProviderConfig discovery endpoint as the maximum allowed value for pagination.

Data Type

Integer

RequestType Property (SCIMDesktop Class)

The HTTP method of the request currently being processed.

Syntax

ANSI (Cross Platform)
char* GetRequestType();

Unicode (Windows)
LPWSTR GetRequestType();
char* cloudsso_scimdesktop_getrequesttype(void* lpObj);
QString getRequestType();

Default Value

""

Remarks

This read-only property is used to determine the HTTP method (GET, POST, PUT, PATCH, or DELETE) of the request being processed. It is eligible to be queried during any event fired by the class.

When the class processes a PATCH request, it fires the GetUser or GetGroup event to retrieve the current resource first. When the ETagEnabled configuration setting is true and the client includes an If-Match header on a PUT or DELETE request, the GetUser or GetGroup event also fires to validate the ETag before the update or delete event.

This property is read-only.

Data Type

String

SSLAuthenticateClients Property (SCIMDesktop Class)

If set to True, the server asks the client(s) for a certificate.

Syntax

ANSI (Cross Platform)
int GetSSLAuthenticateClients();
int SetSSLAuthenticateClients(int bSSLAuthenticateClients); Unicode (Windows) BOOL GetSSLAuthenticateClients();
INT SetSSLAuthenticateClients(BOOL bSSLAuthenticateClients);
int cloudsso_scimdesktop_getsslauthenticateclients(void* lpObj);
int cloudsso_scimdesktop_setsslauthenticateclients(void* lpObj, int bSSLAuthenticateClients);
bool getSSLAuthenticateClients();
int setSSLAuthenticateClients(bool bSSLAuthenticateClients);

Default Value

FALSE

Remarks

This property is used in conjunction with the SSLClientAuthentication event. Please refer to the documentation of the SSLClientAuthentication event for details.

Data Type

Boolean

SSLCert Property (SCIMDesktop Class)

The certificate to be used during Secure Sockets Layer (SSL) negotiation.

Syntax

CloudSSOCertificate* GetSSLCert();
int SetSSLCert(CloudSSOCertificate* val);
char* cloudsso_scimdesktop_getsslcerteffectivedate(void* lpObj);
char* cloudsso_scimdesktop_getsslcertexpirationdate(void* lpObj);
char* cloudsso_scimdesktop_getsslcertextendedkeyusage(void* lpObj);
char* cloudsso_scimdesktop_getsslcertfingerprint(void* lpObj);
char* cloudsso_scimdesktop_getsslcertfingerprintsha1(void* lpObj);
char* cloudsso_scimdesktop_getsslcertfingerprintsha256(void* lpObj);
char* cloudsso_scimdesktop_getsslcertissuer(void* lpObj);
char* cloudsso_scimdesktop_getsslcertprivatekey(void* lpObj);
int cloudsso_scimdesktop_getsslcertprivatekeyavailable(void* lpObj);
char* cloudsso_scimdesktop_getsslcertprivatekeycontainer(void* lpObj);
char* cloudsso_scimdesktop_getsslcertpublickey(void* lpObj);
char* cloudsso_scimdesktop_getsslcertpublickeyalgorithm(void* lpObj);
int cloudsso_scimdesktop_getsslcertpublickeylength(void* lpObj);
char* cloudsso_scimdesktop_getsslcertserialnumber(void* lpObj);
char* cloudsso_scimdesktop_getsslcertsignaturealgorithm(void* lpObj);
int cloudsso_scimdesktop_getsslcertstore(void* lpObj, char** lpSSLCertStore, int* lenSSLCertStore);
int cloudsso_scimdesktop_setsslcertstore(void* lpObj, const char* lpSSLCertStore, int lenSSLCertStore);
char* cloudsso_scimdesktop_getsslcertstorepassword(void* lpObj);
int cloudsso_scimdesktop_setsslcertstorepassword(void* lpObj, const char* lpszSSLCertStorePassword);
int cloudsso_scimdesktop_getsslcertstoretype(void* lpObj);
int cloudsso_scimdesktop_setsslcertstoretype(void* lpObj, int iSSLCertStoreType);
char* cloudsso_scimdesktop_getsslcertsubjectaltnames(void* lpObj);
char* cloudsso_scimdesktop_getsslcertthumbprintmd5(void* lpObj);
char* cloudsso_scimdesktop_getsslcertthumbprintsha1(void* lpObj);
char* cloudsso_scimdesktop_getsslcertthumbprintsha256(void* lpObj);
char* cloudsso_scimdesktop_getsslcertusage(void* lpObj);
int cloudsso_scimdesktop_getsslcertusageflags(void* lpObj);
char* cloudsso_scimdesktop_getsslcertversion(void* lpObj);
char* cloudsso_scimdesktop_getsslcertsubject(void* lpObj);
int cloudsso_scimdesktop_setsslcertsubject(void* lpObj, const char* lpszSSLCertSubject);
int cloudsso_scimdesktop_getsslcertencoded(void* lpObj, char** lpSSLCertEncoded, int* lenSSLCertEncoded);
int cloudsso_scimdesktop_setsslcertencoded(void* lpObj, const char* lpSSLCertEncoded, int lenSSLCertEncoded);
QString getSSLCertEffectiveDate();

QString getSSLCertExpirationDate();

QString getSSLCertExtendedKeyUsage();

QString getSSLCertFingerprint();

QString getSSLCertFingerprintSHA1();

QString getSSLCertFingerprintSHA256();

QString getSSLCertIssuer();

QString getSSLCertPrivateKey();

bool getSSLCertPrivateKeyAvailable();

QString getSSLCertPrivateKeyContainer();

QString getSSLCertPublicKey();

QString getSSLCertPublicKeyAlgorithm();

int getSSLCertPublicKeyLength();

QString getSSLCertSerialNumber();

QString getSSLCertSignatureAlgorithm();

QByteArray getSSLCertStore();
int setSSLCertStore(QByteArray qbaSSLCertStore); QString getSSLCertStorePassword();
int setSSLCertStorePassword(QString qsSSLCertStorePassword); int getSSLCertStoreType();
int setSSLCertStoreType(int iSSLCertStoreType); QString getSSLCertSubjectAltNames(); QString getSSLCertThumbprintMD5(); QString getSSLCertThumbprintSHA1(); QString getSSLCertThumbprintSHA256(); QString getSSLCertUsage(); int getSSLCertUsageFlags(); QString getSSLCertVersion(); QString getSSLCertSubject();
int setSSLCertSubject(QString qsSSLCertSubject); QByteArray getSSLCertEncoded();
int setSSLCertEncoded(QByteArray qbaSSLCertEncoded);

Remarks

This property includes the digital certificate that the class will use during SSL negotiation. Set this property to a valid certificate before starting SSL negotiation. To set a certificate, you may set the Encoded field to the encoded certificate. To select a certificate, use the store and subject fields.

Data Type

CloudSSOCertificate

SSLEnabled Property (SCIMDesktop Class)

This property indicates whether Transport Layer Security/Secure Sockets Layer (TLS/SSL) is enabled.

Syntax

ANSI (Cross Platform)
int GetSSLEnabled();
int SetSSLEnabled(int bSSLEnabled); Unicode (Windows) BOOL GetSSLEnabled();
INT SetSSLEnabled(BOOL bSSLEnabled);
int cloudsso_scimdesktop_getsslenabled(void* lpObj);
int cloudsso_scimdesktop_setsslenabled(void* lpObj, int bSSLEnabled);
bool getSSLEnabled();
int setSSLEnabled(bool bSSLEnabled);

Default Value

FALSE

Remarks

This property specifies whether TLS/SSL is enabled in the class. When False (default), the class operates in plaintext mode. When True, TLS/SSL is enabled.

TLS/SSL may also be enabled by setting SSLStartMode. Setting SSLStartMode will automatically update this property value.

This property is not available at design time.

Data Type

Boolean

SSLProvider Property (SCIMDesktop Class)

The Secure Sockets Layer/Transport Layer Security (SSL/TLS) implementation to use.

Syntax

ANSI (Cross Platform)
int GetSSLProvider();
int SetSSLProvider(int iSSLProvider); Unicode (Windows) INT GetSSLProvider();
INT SetSSLProvider(INT iSSLProvider);

Possible Values

SSLP_AUTOMATIC(0), 
SSLP_PLATFORM(1),
SSLP_INTERNAL(2)
int cloudsso_scimdesktop_getsslprovider(void* lpObj);
int cloudsso_scimdesktop_setsslprovider(void* lpObj, int iSSLProvider);
int getSSLProvider();
int setSSLProvider(int iSSLProvider);

Default Value

0

Remarks

This property specifies the SSL/TLS implementation to use. In most cases the default value of 0 (Automatic) is recommended and should not be changed. When set to 0 (Automatic), the class will select whether to use the platform implementation or the internal implementation depending on the operating system as well as the TLS version being used.

Possible values are as follows:

0 (sslpAutomatic - default)Automatically selects the appropriate implementation.
1 (sslpPlatform) Uses the platform/system implementation.
2 (sslpInternal) Uses the internal implementation.
Additional Notes

In most cases using the default value (Automatic) is recommended. The class will select a provider depending on the current platform.

When Automatic is selected, on Windows, the class will use the platform implementation. On Linux/macOS, the class will use the internal implementation. When TLS 1.3 is enabled via SSLEnabledProtocols, the class will always try and use the platform implementation. If the platform TLS 1.3 implementation is not available, the internal implementation will be used.

Data Type

Integer

SupportedOperations Property (SCIMDesktop Class)

A bitmask that controls which SCIM operations the class accepts.

Syntax

ANSI (Cross Platform)
int GetSupportedOperations();
int SetSupportedOperations(int iSupportedOperations); Unicode (Windows) INT GetSupportedOperations();
INT SetSupportedOperations(INT iSupportedOperations);
int cloudsso_scimdesktop_getsupportedoperations(void* lpObj);
int cloudsso_scimdesktop_setsupportedoperations(void* lpObj, int iSupportedOperations);
int getSupportedOperations();
int setSupportedOperations(int iSupportedOperations);

Default Value

65535

Remarks

This property determines which SCIM operations are enabled. Requests for disabled operations receive a 501 Not Implemented response. The following flags are defined (specified in hexadecimal notation) and may be combined:

0x0001 (sopUserCreate)Accept POST /Users requests. Fires the CreateUser event.
0x0002 (sopUserRead)Accept GET /Users/{id} requests. Fires the GetUser event.
0x0004 (sopUserUpdate)Accept PUT /Users/{id} and PATCH /Users/{id} requests. Fires the GetUser and UpdateUser events.
0x0008 (sopUserDelete)Accept DELETE /Users/{id} requests. Fires the DeleteUser event.
0x0010 (sopUserList)Accept GET /Users requests. Fires the ListUsers event.
0x0100 (sopGroupCreate)Accept POST /Groups requests. Fires the CreateGroup event.
0x0200 (sopGroupRead)Accept GET /Groups/{id} requests. Fires the GetGroup event.
0x0400 (sopGroupUpdate)Accept PUT /Groups/{id} and PATCH /Groups/{id} requests. Fires the GetGroup and UpdateGroup events.
0x0800 (sopGroupDelete)Accept DELETE /Groups/{id} requests. Fires the DeleteGroup event.
0x1000 (sopGroupList)Accept GET /Groups requests. Fires the ListGroups event.
0xFFFF (sopAll)Enable all operations, which is the default.

Bits not listed above are reserved for future use and are currently ignored. sopAll is defined as 0xFFFF to include any operations added in future versions.

Note that PUT and PATCH requests share the same flag (sopUserUpdate / sopGroupUpdate). Enabling the flag accepts both methods, and disabling it rejects both. For PATCH requests, the class retrieves the current resource via GetUser or GetGroup, applies the patch operations, then fires UpdateUser or UpdateGroup with the merged result.

When the ETagEnabled configuration setting is enabled and a PUT or DELETE request includes an If-Match header, the class also fires GetUser or GetGroup to validate the ETag before the update or delete event fires.

The discovery endpoints (/ServiceProviderConfig, /ResourceTypes, /Schemas) are always available regardless of this property's value.

The capabilities advertised in the ServiceProviderConfig discovery endpoint are derived from this property automatically.

Data Type

Integer

UserEmails Property (SCIMDesktop Class)

A collection of email addresses for the current inbound user.

Syntax

CloudSSOList<CloudSSOSCIMEmail>* GetUserEmails();
int cloudsso_scimdesktop_getuseremailcount(void* lpObj);
char* cloudsso_scimdesktop_getuseremailaddress(void* lpObj, int useremailindex);
char* cloudsso_scimdesktop_getuseremailtype(void* lpObj, int useremailindex);
int cloudsso_scimdesktop_getuseremailprimary(void* lpObj, int useremailindex);
int getUserEmailCount();

QString getUserEmailAddress(int iUserEmailIndex);

QString getUserEmailType(int iUserEmailIndex);

bool getUserEmailPrimary(int iUserEmailIndex);

Remarks

This collection holds a list of SCIMEmail items.

When the CreateUser event is fired, this collection is populated with the email addresses provided in the request. When the UpdateUser event is fired, it is populated with the complete final email address list. For a PATCH request, this reflects the user loaded via the GetUser event with the patch operations applied. For a PUT request, it reflects the email address list from the request body directly. Each entry exposes an Address, EmailType, and Primary field.

To include email addresses in an outgoing response, the Address value should be passed to the Address parameter when calling the AddUserEmail method.

This property is read-only and not available at design time.

Data Type

CloudSSOSCIMEmail

UserExtension Property (SCIMDesktop Class)

The enterprise extension attributes for the current inbound user.

Syntax

CloudSSOSCIMExtension* GetUserExtension();
char* cloudsso_scimdesktop_getuserextensioncostcenter(void* lpObj);
char* cloudsso_scimdesktop_getuserextensiondepartment(void* lpObj);
char* cloudsso_scimdesktop_getuserextensiondivision(void* lpObj);
char* cloudsso_scimdesktop_getuserextensionemployeenumber(void* lpObj);
char* cloudsso_scimdesktop_getuserextensionmanagerdisplayname(void* lpObj);
char* cloudsso_scimdesktop_getuserextensionmanagerid(void* lpObj);
char* cloudsso_scimdesktop_getuserextensionmanagerref(void* lpObj);
char* cloudsso_scimdesktop_getuserextensionorganization(void* lpObj);
QString getUserExtensionCostCenter();

QString getUserExtensionDepartment();

QString getUserExtensionDivision();

QString getUserExtensionEmployeeNumber();

QString getUserExtensionManagerDisplayName();

QString getUserExtensionManagerId();

QString getUserExtensionManagerRef();

QString getUserExtensionOrganization();

Remarks

When the CreateUser event is fired, this property contains the enterprise extension attributes provided in the request. When the UpdateUser event is fired, it contains the final values. For a PATCH request, this reflects the user loaded via the GetUser event with the patch operations applied. For a PUT request, it reflects the enterprise extension attributes from the request body directly.

This property exposes the following fields: Department, EmployeeNumber, CostCenter, Organization, Division, ManagerId, ManagerRef, and ManagerDisplayName. The class will set any fields not included in the request to "" (empty string).

To include enterprise extension data in an outgoing response, the AddUserExtension method should be called.

The class natively supports the SCIM enterprise user extension schema (urn:ietf:params:scim:schemas:extension:enterprise:2.0:User). The extension schema namespace is handled internally. The API exposes extension attributes directly without requiring the URN to be specified. Additional extension schemas may be supported in future releases.

This property is read-only and not available at design time.

Data Type

CloudSSOSCIMExtension

UserPhones Property (SCIMDesktop Class)

A collection of phone numbers for the current inbound user.

Syntax

CloudSSOList<CloudSSOSCIMPhone>* GetUserPhones();
int cloudsso_scimdesktop_getuserphonecount(void* lpObj);
char* cloudsso_scimdesktop_getuserphonenumber(void* lpObj, int userphoneindex);
char* cloudsso_scimdesktop_getuserphonetype(void* lpObj, int userphoneindex);
int cloudsso_scimdesktop_getuserphoneprimary(void* lpObj, int userphoneindex);
int getUserPhoneCount();

QString getUserPhoneNumber(int iUserPhoneIndex);

QString getUserPhoneType(int iUserPhoneIndex);

bool getUserPhonePrimary(int iUserPhoneIndex);

Remarks

This collection holds a list of SCIMPhone items.

When the CreateUser event is fired, this collection is populated with the phone numbers provided in the request. When the UpdateUser event is fired, it is populated with the complete final phone number list. For a PATCH request, this reflects the user loaded via the GetUser event with the patch operations applied. For a PUT request, it reflects the phone number list from the request body directly. Each entry exposes a Number, PhoneType, and Primary field.

To include phone numbers in an outgoing response, the Number value should be passed to the Number parameter when calling the AddUserPhone method.

This property is read-only and not available at design time.

Data Type

CloudSSOSCIMPhone

AddGroup Method (SCIMDesktop Class)

Adds a group entry to the outgoing list response.

Syntax

ANSI (Cross Platform)
int AddGroup(const char* lpszGroupId, const char* lpszDisplayName, const char* lpszExternalId);

Unicode (Windows)
INT AddGroup(LPCWSTR lpszGroupId, LPCWSTR lpszDisplayName, LPCWSTR lpszExternalId);
int cloudsso_scimdesktop_addgroup(void* lpObj, const char* lpszGroupId, const char* lpszDisplayName, const char* lpszExternalId);
int addGroup(const QString& qsGroupId, const QString& qsDisplayName, const QString& qsExternalId);

Remarks

This method should be called within a ListGroups event handler once for each group in the current page of results. The class then assembles all added entries into the SCIM ListResponse envelope.

GroupId is the unique identifier for the group, and DisplayName may be empty if not available.

The stored ExternalId should be passed for the group (or "" (empty string) if not recorded).

After all entries have been added, the TotalResults event parameter should be set to the total number of matching groups across all pages, which may be greater than the number of entries added in the current method call.

scim.OnListGroups += (sender, e) => { var page = db.QueryGroups(e.FilterAttribute, e.FilterOperator, e.FilterValue, e.StartIndex - 1, e.Count); foreach (var group in page.Results) { scim.AddGroup(group.Id, group.DisplayName, group.ExternalId); } e.TotalResults = page.TotalCount; e.StatusCode = 200; };

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddGroupMember Method (SCIMDesktop Class)

Adds a member to the outgoing group response.

Syntax

ANSI (Cross Platform)
int AddGroupMember(const char* lpszGroupId, const char* lpszMemberId, const char* lpszMemberDisplay);

Unicode (Windows)
INT AddGroupMember(LPCWSTR lpszGroupId, LPCWSTR lpszMemberId, LPCWSTR lpszMemberDisplay);
int cloudsso_scimdesktop_addgroupmember(void* lpObj, const char* lpszGroupId, const char* lpszMemberId, const char* lpszMemberDisplay);
int addGroupMember(const QString& qsGroupId, const QString& qsMemberId, const QString& qsMemberDisplay);

Remarks

This method should be called within a GetGroup or ListGroups event handler once for each group member to be included in the SCIM response.

GroupId identifies the group to which the member belongs, and MemberId and MemberDisplay represent the SCIM resource ID and display name of the member user, respectively.

scim.OnGetGroup += (sender, e) => { var group = db.FindGroup(e.GroupId); e.DisplayName = group.DisplayName; e.ExternalId = group.ExternalId; foreach (var member in group.Members) { scim.AddGroupMember(e.GroupId, member.UserId, member.DisplayName); } e.StatusCode = 200; };

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddUser Method (SCIMDesktop Class)

Adds a user entry to the outgoing list response.

Syntax

ANSI (Cross Platform)
int AddUser(const char* lpszUserId, const char* lpszUserName, const char* lpszDisplayName, const char* lpszExternalId, int bActive);

Unicode (Windows)
INT AddUser(LPCWSTR lpszUserId, LPCWSTR lpszUserName, LPCWSTR lpszDisplayName, LPCWSTR lpszExternalId, BOOL bActive);
int cloudsso_scimdesktop_adduser(void* lpObj, const char* lpszUserId, const char* lpszUserName, const char* lpszDisplayName, const char* lpszExternalId, int bActive);
int addUser(const QString& qsUserId, const QString& qsUserName, const QString& qsDisplayName, const QString& qsExternalId, bool bActive);

Remarks

This method should be called within a ListUsers event handler once for each user in the current page of results. The class then assembles all added entries into the SCIM ListResponse envelope.

UserId is the unique identifier for the user, UserName is the user's SCIM username, and DisplayName may be empty if not available.

The stored ExternalId should be passed for the user (or "" (empty string) if not recorded). Active indicates whether the user account is enabled.

After all entries have been added, the TotalResults event parameter should be set to the total number of matching users across all pages, which may be greater than the number of entries added in the current method call.

void scim_ListUsers(object sender, SCIMDesktopListUsersEventArgs e) { var results = db.QueryUsers(e.FilterAttribute, e.FilterOperator, e.FilterValue, e.StartIndex - 1, e.Count); foreach (var user in results.Page) scim.AddUser(user.Id, user.UserName, user.DisplayName, user.ExternalId, user.Active); e.TotalResults = results.TotalCount; e.StatusCode = 0; }

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddUserEmail Method (SCIMDesktop Class)

Adds an email address to the outgoing user response.

Syntax

ANSI (Cross Platform)
int AddUserEmail(const char* lpszUserId, const char* lpszAddress, const char* lpszEmailType, int bPrimary);

Unicode (Windows)
INT AddUserEmail(LPCWSTR lpszUserId, LPCWSTR lpszAddress, LPCWSTR lpszEmailType, BOOL bPrimary);
int cloudsso_scimdesktop_adduseremail(void* lpObj, const char* lpszUserId, const char* lpszAddress, const char* lpszEmailType, int bPrimary);
int addUserEmail(const QString& qsUserId, const QString& qsAddress, const QString& qsEmailType, bool bPrimary);

Remarks

This method should be called within a GetUser or ListUsers event handler once for each user's email address to be included in the response.

UserId identifies which user the address belongs to. Address is the email address string, and EmailType classifies the address (common values include work, home, and other). Primary should be set to true only for the user's primary address.

scim.OnGetUser += (sender, e) => { var user = db.FindUser(e.UserId); e.UserName = user.UserName; e.DisplayName = user.DisplayName; e.Active = user.Active; foreach (var email in user.Emails) { scim.AddUserEmail(e.UserId, email.Address, email.EmailType, email.Primary); } e.StatusCode = 200; };

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddUserExtension Method (SCIMDesktop Class)

Adds enterprise extension attributes to the outgoing user response.

Syntax

ANSI (Cross Platform)
int AddUserExtension(const char* lpszUserId, const char* lpszDepartment, const char* lpszEmployeeNumber, const char* lpszCostCenter, const char* lpszOrganization, const char* lpszDivision, const char* lpszManagerId, const char* lpszManagerRef, const char* lpszManagerDisplayName);

Unicode (Windows)
INT AddUserExtension(LPCWSTR lpszUserId, LPCWSTR lpszDepartment, LPCWSTR lpszEmployeeNumber, LPCWSTR lpszCostCenter, LPCWSTR lpszOrganization, LPCWSTR lpszDivision, LPCWSTR lpszManagerId, LPCWSTR lpszManagerRef, LPCWSTR lpszManagerDisplayName);
int cloudsso_scimdesktop_adduserextension(void* lpObj, const char* lpszUserId, const char* lpszDepartment, const char* lpszEmployeeNumber, const char* lpszCostCenter, const char* lpszOrganization, const char* lpszDivision, const char* lpszManagerId, const char* lpszManagerRef, const char* lpszManagerDisplayName);
int addUserExtension(const QString& qsUserId, const QString& qsDepartment, const QString& qsEmployeeNumber, const QString& qsCostCenter, const QString& qsOrganization, const QString& qsDivision, const QString& qsManagerId, const QString& qsManagerRef, const QString& qsManagerDisplayName);

Remarks

This method should be called within a GetUser or ListUsers event handler once for each user's enterprise extension data to be included in the response.

UserId identifies which user the data belongs to. Department, EmployeeNumber, CostCenter, Organization, and Division are the enterprise user attributes.

ManagerId is the user identifier of the user's manager, ManagerRef is the full URI of the manager's user resource, and ManagerDisplayName is the manager's display name.

"" (empty string) should be passed for any attribute that is not applicable or not stored.

scim.OnGetUser += (sender, e) => { var user = db.FindUser(e.UserId); e.UserName = user.UserName; e.DisplayName = user.DisplayName; e.Active = user.Active; if (user.HasManager) { scim.AddUserExtension(e.UserId, user.Department, user.EmployeeNumber, user.CostCenter, user.Organization, user.Division, user.ManagerId, "", user.ManagerDisplayName); } e.StatusCode = 200; };

The class natively supports the SCIM enterprise user extension schema (urn:ietf:params:scim:schemas:extension:enterprise:2.0:User). The extension schema namespace is handled internally. The API exposes extension attributes directly without requiring the URN to be specified. Additional extension schemas may be supported in future releases.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddUserPhone Method (SCIMDesktop Class)

Adds a phone number to the outgoing user response.

Syntax

ANSI (Cross Platform)
int AddUserPhone(const char* lpszUserId, const char* lpszNumber, const char* lpszPhoneType, int bPrimary);

Unicode (Windows)
INT AddUserPhone(LPCWSTR lpszUserId, LPCWSTR lpszNumber, LPCWSTR lpszPhoneType, BOOL bPrimary);
int cloudsso_scimdesktop_adduserphone(void* lpObj, const char* lpszUserId, const char* lpszNumber, const char* lpszPhoneType, int bPrimary);
int addUserPhone(const QString& qsUserId, const QString& qsNumber, const QString& qsPhoneType, bool bPrimary);

Remarks

This method should be called within a GetUser or ListUsers event handler once for each user's phone number to be included in the response.

UserId identifies which user the number belongs to. Number is the phone number string, and PhoneType classifies the number (common values include work, mobile, home, and other). Primary should be set to true only for the user's primary number.

scim.OnGetUser += (sender, e) => { var user = db.FindUser(e.UserId); e.UserName = user.UserName; e.DisplayName = user.DisplayName; e.Active = user.Active; foreach (var phone in user.Phones) { scim.AddUserPhone(e.UserId, phone.Number, phone.PhoneType, phone.Primary); } e.StatusCode = 200; };

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Config Method (SCIMDesktop Class)

Sets or retrieves a configuration setting.

Syntax

ANSI (Cross Platform)
char* Config(const char* lpszConfigurationString);

Unicode (Windows)
LPWSTR Config(LPCWSTR lpszConfigurationString);
char* cloudsso_scimdesktop_config(void* lpObj, const char* lpszConfigurationString);
QString config(const QString& qsConfigurationString);

Remarks

Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

Error Handling (C++)

This method returns a String value ; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Disconnect Method (SCIMDesktop Class)

This method disconnects the specified client.

Syntax

ANSI (Cross Platform)
int Disconnect(int iConnectionId);

Unicode (Windows)
INT Disconnect(INT iConnectionId);
int cloudsso_scimdesktop_disconnect(void* lpObj, int iConnectionId);
int disconnect(int iConnectionId);

Remarks

Calling this method will disconnect the client specified by the ConnectionId parameter.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

DoEvents Method (SCIMDesktop Class)

This method processes events from the internal message queue.

Syntax

ANSI (Cross Platform)
int DoEvents();

Unicode (Windows)
INT DoEvents();
int cloudsso_scimdesktop_doevents(void* lpObj);
int doEvents();

Remarks

When DoEvents is called, the class processes any available events. If no events are available, it waits for a preset period of time, and then returns.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Reset Method (SCIMDesktop Class)

This method will reset the class.

Syntax

ANSI (Cross Platform)
int Reset();

Unicode (Windows)
INT Reset();
int cloudsso_scimdesktop_reset(void* lpObj);
int reset();

Remarks

This method will reset the class's properties to their default values.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Shutdown Method (SCIMDesktop Class)

This method shuts down the server.

Syntax

ANSI (Cross Platform)
int Shutdown();

Unicode (Windows)
INT Shutdown();
int cloudsso_scimdesktop_shutdown(void* lpObj);
int shutdown();

Remarks

This method shuts down the server. Calling this method is equivalent to calling StopListening and then breaking every client connection by calling Disconnect.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

StartListening Method (SCIMDesktop Class)

This method starts listening for incoming connections.

Syntax

ANSI (Cross Platform)
int StartListening();

Unicode (Windows)
INT StartListening();
int cloudsso_scimdesktop_startlistening(void* lpObj);
int startListening();

Remarks

This method begins listening for incoming connections on the port specified by LocalPort. Once listening, events will fire as new clients connect and data are transferred.

To stop listening for new connections, call StopListening. To stop listening for new connections and to disconnect all existing clients, call Shutdown.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

StopListening Method (SCIMDesktop Class)

This method stops listening for new connections.

Syntax

ANSI (Cross Platform)
int StopListening();

Unicode (Windows)
INT StopListening();
int cloudsso_scimdesktop_stoplistening(void* lpObj);
int stopListening();

Remarks

This method stops listening for new connections. After being called, any new connection attempts will be rejected. Calling this method does not disconnect existing connections.

To stop listening and to disconnect all existing clients, call Shutdown instead.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AuthRequest Event (SCIMDesktop Class)

Fired for every incoming request to control access to specific endpoints.

Syntax

ANSI (Cross Platform)
virtual int FireAuthRequest(SCIMDesktopAuthRequestEventParams *e);
typedef struct {
int ConnectionId;
const char* AuthMethod;
const char* User;
const char* Token;
int Accept; int reserved; } SCIMDesktopAuthRequestEventParams;
Unicode (Windows) virtual INT FireAuthRequest(SCIMDesktopAuthRequestEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR AuthMethod;
LPCWSTR User;
LPCWSTR Token;
BOOL Accept; INT reserved; } SCIMDesktopAuthRequestEventParams;
#define EID_SCIMDESKTOP_AUTHREQUEST 1

virtual INT CLOUDSSO_CALL FireAuthRequest(int &iConnectionId, char* &lpszAuthMethod, char* &lpszUser, char* &lpszToken, int &bAccept);
class SCIMDesktopAuthRequestEventParams {
public:
  int connectionId();

  const QString& authMethod();

  const QString& user();

  const QString& token();

  bool accept();
  void setAccept(bool bAccept);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireAuthRequest(SCIMDesktopAuthRequestEventParams *e) {...} // Or, connect one or more slots to this signal. void authRequest(SCIMDesktopAuthRequestEventParams *e);

Remarks

This event fires for every incoming request before any resource event is raised, allowing the application to implement custom authentication logic.

The AuthMethod parameter identifies the authentication scheme supplied by the client.

BearerThe Token parameter contains the raw bearer token, and the User parameter remains empty. If the AuthToken property has been set, the class automatically compares it against the incoming token and pre-initializes the Accept parameter with the result. When AuthToken is not set, Accept defaults to false.
BasicThe class decodes the base64 credentials and splits them on the colon separator. User contains the username and Token contains the password. Accept defaults to false. No automatic credential check is performed.
Other/UnrecognizedThe AuthMethod parameter contains the scheme name as supplied by the client. Token contains everything following it and User is empty. Accept defaults to false.
"" (empty string)No Authorization header was present. User and Token are both set to "" (empty string). Accept defaults to false.

The Accept value may be changed when additional logic outside of the class is required (e.g., to enforce token expiry, check a revocation list, or accept an alternative authentication scheme).

Requests rejected by this event receive a 401 Unauthorized response.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

Note that this event fires for every incoming request.

Custom validation covering multiple authentication schemes may be performed as shown.

scim.OnAuthRequest += (sender, e) => { if (e.AuthMethod == "Bearer") { e.Accept = tokenStore.IsValid(e.Token); } else if (e.AuthMethod == "Basic") { e.Accept = userStore.CheckPassword(e.User, e.Token); } else { e.Accept = false; } };

Connected Event (SCIMDesktop Class)

This event is fired immediately after a connection completes (or fails).

Syntax

ANSI (Cross Platform)
virtual int FireConnected(SCIMDesktopConnectedEventParams *e);
typedef struct {
int ConnectionId;
int StatusCode;
const char* Description; int reserved; } SCIMDesktopConnectedEventParams;
Unicode (Windows) virtual INT FireConnected(SCIMDesktopConnectedEventParams *e);
typedef struct {
INT ConnectionId;
INT StatusCode;
LPCWSTR Description; INT reserved; } SCIMDesktopConnectedEventParams;
#define EID_SCIMDESKTOP_CONNECTED 2

virtual INT CLOUDSSO_CALL FireConnected(int &iConnectionId, int &iStatusCode, char* &lpszDescription);
class SCIMDesktopConnectedEventParams {
public:
  int connectionId();

  int statusCode();

  const QString& description();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireConnected(SCIMDesktopConnectedEventParams *e) {...} // Or, connect one or more slots to this signal. void connected(SCIMDesktopConnectedEventParams *e);

Remarks

If the connection is made normally, StatusCode is 0, and Description is "OK".

If the connection fails, StatusCode has the error code returned by the system. Description contains a description of this code. The value of StatusCode is equal to the value of the system error.

Please refer to the Error Codes section for more information.

ConnectionRequest Event (SCIMDesktop Class)

This event is fired when a request for connection comes from a remote host.

Syntax

ANSI (Cross Platform)
virtual int FireConnectionRequest(SCIMDesktopConnectionRequestEventParams *e);
typedef struct {
const char* Address;
int Port;
int Accept; int reserved; } SCIMDesktopConnectionRequestEventParams;
Unicode (Windows) virtual INT FireConnectionRequest(SCIMDesktopConnectionRequestEventParams *e);
typedef struct {
LPCWSTR Address;
INT Port;
BOOL Accept; INT reserved; } SCIMDesktopConnectionRequestEventParams;
#define EID_SCIMDESKTOP_CONNECTIONREQUEST 3

virtual INT CLOUDSSO_CALL FireConnectionRequest(char* &lpszAddress, int &iPort, int &bAccept);
class SCIMDesktopConnectionRequestEventParams {
public:
  const QString& address();

  int port();

  bool accept();
  void setAccept(bool bAccept);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireConnectionRequest(SCIMDesktopConnectionRequestEventParams *e) {...} // Or, connect one or more slots to this signal. void connectionRequest(SCIMDesktopConnectionRequestEventParams *e);

Remarks

This event indicates an incoming connection. The connection is accepted by default. Address and Port will contain information about the remote host requesting the inbound connection. If you want to refuse it, you can set the Accept parameter to False.

CreateGroup Event (SCIMDesktop Class)

Fired when a request to create a new group is received.

Syntax

ANSI (Cross Platform)
virtual int FireCreateGroup(SCIMDesktopCreateGroupEventParams *e);
typedef struct {
int ConnectionId;
const char* ExternalId;
const char* DisplayName;
char* GroupId;
int StatusCode; int reserved; } SCIMDesktopCreateGroupEventParams;
Unicode (Windows) virtual INT FireCreateGroup(SCIMDesktopCreateGroupEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR ExternalId;
LPCWSTR DisplayName;
LPWSTR GroupId;
INT StatusCode; INT reserved; } SCIMDesktopCreateGroupEventParams;
#define EID_SCIMDESKTOP_CREATEGROUP 4

virtual INT CLOUDSSO_CALL FireCreateGroup(int &iConnectionId, char* &lpszExternalId, char* &lpszDisplayName, char* &lpszGroupId, int &iStatusCode);
class SCIMDesktopCreateGroupEventParams {
public:
  int connectionId();

  const QString& externalId();

  const QString& displayName();

  const QString& groupId();
  void setGroupId(const QString& qsGroupId);

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireCreateGroup(SCIMDesktopCreateGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void createGroup(SCIMDesktopCreateGroupEventParams *e);

Remarks

This event fires when the class receives a POST /Groups request from the Identity Provider. The inbound group attributes are provided as event parameters.

If the Identity Provider included an externalId in the request, it is made available in the ExternalId parameter. This value should be stored alongside the group record so it can be returned in future GetGroup event responses.

If the request includes group members, they are made available via the GroupMembers collection, where each entry exposes a MemberId and MemberDisplay field.

If the group is created successfully, the GroupId parameter must be set to the newly assigned identifier, and the StatusCode parameter must be set to 201. The full created resource is returned to the Identity Provider in the 201 Created response body. To signal an error, StatusCode must be set to the appropriate HTTP status code (e.g., 409 for a duplicate group). The StatusCode parameter defaults to 500, and a value of 0 is treated as 201.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

CreateUser Event (SCIMDesktop Class)

Fired when a request to create a new user is received.

Syntax

ANSI (Cross Platform)
virtual int FireCreateUser(SCIMDesktopCreateUserEventParams *e);
typedef struct {
int ConnectionId;
const char* ExternalId;
const char* UserName;
const char* GivenName;
const char* FamilyName;
const char* DisplayName;
int Active;
char* UserId;
int StatusCode; int reserved; } SCIMDesktopCreateUserEventParams;
Unicode (Windows) virtual INT FireCreateUser(SCIMDesktopCreateUserEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR ExternalId;
LPCWSTR UserName;
LPCWSTR GivenName;
LPCWSTR FamilyName;
LPCWSTR DisplayName;
BOOL Active;
LPWSTR UserId;
INT StatusCode; INT reserved; } SCIMDesktopCreateUserEventParams;
#define EID_SCIMDESKTOP_CREATEUSER 5

virtual INT CLOUDSSO_CALL FireCreateUser(int &iConnectionId, char* &lpszExternalId, char* &lpszUserName, char* &lpszGivenName, char* &lpszFamilyName, char* &lpszDisplayName, int &bActive, char* &lpszUserId, int &iStatusCode);
class SCIMDesktopCreateUserEventParams {
public:
  int connectionId();

  const QString& externalId();

  const QString& userName();

  const QString& givenName();

  const QString& familyName();

  const QString& displayName();

  bool active();

  const QString& userId();
  void setUserId(const QString& qsUserId);

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireCreateUser(SCIMDesktopCreateUserEventParams *e) {...} // Or, connect one or more slots to this signal. void createUser(SCIMDesktopCreateUserEventParams *e);

Remarks

This event fires when the class receives a POST /Users request from the Identity Provider. The inbound user attributes are provided as event parameters.

If the Identity Provider included an externalId in the request, it is made available in the ExternalId parameter. This value should be stored alongside the user record so it can be returned in future GetUser event responses.

The Active parameter indicates whether the new user account should be enabled. If the Identity Provider does not include an active attribute in the request, Active defaults to true.

Email addresses and phone numbers supplied in the request are made available via the UserEmails and UserPhones collections, where each entry exposes an Address, EmailType, and Primary field (for emails) or a Number, PhoneType, and Primary field (for phones). If the Identity Provider included enterprise extension attributes in the request, they are also made available via the UserExtension property.

If the user is created successfully, the UserId parameter must be set to the newly assigned identifier, and the StatusCode parameter must be set to 201. The full created resource is returned to the Identity Provider in the 201 Created response body. To signal an error, StatusCode must be set to the appropriate HTTP status code (e.g., 409 for a duplicate user). The StatusCode parameter defaults to 500, and a value of 0 is treated as 201.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

DeleteGroup Event (SCIMDesktop Class)

Fired when a request to delete a group is received.

Syntax

ANSI (Cross Platform)
virtual int FireDeleteGroup(SCIMDesktopDeleteGroupEventParams *e);
typedef struct {
int ConnectionId;
const char* GroupId;
int StatusCode; int reserved; } SCIMDesktopDeleteGroupEventParams;
Unicode (Windows) virtual INT FireDeleteGroup(SCIMDesktopDeleteGroupEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR GroupId;
INT StatusCode; INT reserved; } SCIMDesktopDeleteGroupEventParams;
#define EID_SCIMDESKTOP_DELETEGROUP 6

virtual INT CLOUDSSO_CALL FireDeleteGroup(int &iConnectionId, char* &lpszGroupId, int &iStatusCode);
class SCIMDesktopDeleteGroupEventParams {
public:
  int connectionId();

  const QString& groupId();

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireDeleteGroup(SCIMDesktopDeleteGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void deleteGroup(SCIMDesktopDeleteGroupEventParams *e);

Remarks

This event fires when the class receives a DELETE /Groups/{id} request from the Identity Provider. The GroupId parameter identifies the group to delete.

If the deletion is successful, the StatusCode parameter must be set to 204. The class then returns a 204 No Content response. If the group is not found, StatusCode must be set to 404. The StatusCode parameter defaults to 500, and a value of 0 is treated as 204.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

DeleteUser Event (SCIMDesktop Class)

Fired when a request to delete a user is received.

Syntax

ANSI (Cross Platform)
virtual int FireDeleteUser(SCIMDesktopDeleteUserEventParams *e);
typedef struct {
int ConnectionId;
const char* UserId;
int StatusCode; int reserved; } SCIMDesktopDeleteUserEventParams;
Unicode (Windows) virtual INT FireDeleteUser(SCIMDesktopDeleteUserEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR UserId;
INT StatusCode; INT reserved; } SCIMDesktopDeleteUserEventParams;
#define EID_SCIMDESKTOP_DELETEUSER 7

virtual INT CLOUDSSO_CALL FireDeleteUser(int &iConnectionId, char* &lpszUserId, int &iStatusCode);
class SCIMDesktopDeleteUserEventParams {
public:
  int connectionId();

  const QString& userId();

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireDeleteUser(SCIMDesktopDeleteUserEventParams *e) {...} // Or, connect one or more slots to this signal. void deleteUser(SCIMDesktopDeleteUserEventParams *e);

Remarks

This event fires when the class receives a DELETE /Users/{id} request from the Identity Provider. The UserId parameter identifies the user to delete.

If the deletion is successful, the StatusCode parameter must be set to 204. The class then returns a 204 No Content response. If the user is not found, StatusCode must be set to 404. The StatusCode parameter defaults to 500, and a value of 0 is treated as 204.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

Disconnected Event (SCIMDesktop Class)

This event is fired when a connection is closed.

Syntax

ANSI (Cross Platform)
virtual int FireDisconnected(SCIMDesktopDisconnectedEventParams *e);
typedef struct {
int ConnectionId;
int StatusCode;
const char* Description; int reserved; } SCIMDesktopDisconnectedEventParams;
Unicode (Windows) virtual INT FireDisconnected(SCIMDesktopDisconnectedEventParams *e);
typedef struct {
INT ConnectionId;
INT StatusCode;
LPCWSTR Description; INT reserved; } SCIMDesktopDisconnectedEventParams;
#define EID_SCIMDESKTOP_DISCONNECTED 8

virtual INT CLOUDSSO_CALL FireDisconnected(int &iConnectionId, int &iStatusCode, char* &lpszDescription);
class SCIMDesktopDisconnectedEventParams {
public:
  int connectionId();

  int statusCode();

  const QString& description();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireDisconnected(SCIMDesktopDisconnectedEventParams *e) {...} // Or, connect one or more slots to this signal. void disconnected(SCIMDesktopDisconnectedEventParams *e);

Remarks

If the connection is broken normally, StatusCode is 0, and Description is "OK".

If the connection is broken for any other reason, StatusCode has the error code returned by the system. Description contains a description of this code. The value of StatusCode is equal to the value of the system error.

Please refer to the Error Codes section for more information.

Error Event (SCIMDesktop Class)

This event fires information about errors during data delivery.

Syntax

ANSI (Cross Platform)
virtual int FireError(SCIMDesktopErrorEventParams *e);
typedef struct {
int ConnectionId;
int ErrorCode;
const char* Description; int reserved; } SCIMDesktopErrorEventParams;
Unicode (Windows) virtual INT FireError(SCIMDesktopErrorEventParams *e);
typedef struct {
INT ConnectionId;
INT ErrorCode;
LPCWSTR Description; INT reserved; } SCIMDesktopErrorEventParams;
#define EID_SCIMDESKTOP_ERROR 9

virtual INT CLOUDSSO_CALL FireError(int &iConnectionId, int &iErrorCode, char* &lpszDescription);
class SCIMDesktopErrorEventParams {
public:
  int connectionId();

  int errorCode();

  const QString& description();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireError(SCIMDesktopErrorEventParams *e) {...} // Or, connect one or more slots to this signal. void error(SCIMDesktopErrorEventParams *e);

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally, the class fails with an error.

ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

ConnectionId indicates the connection for which the error is applicable.

This event also fires when the class rejects a SCIM request, immediately before the error response is returned to the Identity Provider. This includes requests the class itself rejects, such as a malformed request body or a failed authentication. It also includes requests an application event handler rejects by setting its StatusCode parameter to 400 or higher. Those requests report the generic error code 1.

For a rejected SCIM request, Description is the message carried in the detail field of the SCIM error response body. The HTTP status and the response body have already been determined by the time the event fires, so a handler cannot change what is returned to the Identity Provider.

GetGroup Event (SCIMDesktop Class)

Fired when a request to retrieve a group is received, before a PATCH group update, or when ETags are enabled and a PUT or DELETE request includes an If-Match header.

Syntax

ANSI (Cross Platform)
virtual int FireGetGroup(SCIMDesktopGetGroupEventParams *e);
typedef struct {
int ConnectionId;
const char* GroupId;
char* ExternalId;
char* DisplayName;
int StatusCode; int reserved; } SCIMDesktopGetGroupEventParams;
Unicode (Windows) virtual INT FireGetGroup(SCIMDesktopGetGroupEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR GroupId;
LPWSTR ExternalId;
LPWSTR DisplayName;
INT StatusCode; INT reserved; } SCIMDesktopGetGroupEventParams;
#define EID_SCIMDESKTOP_GETGROUP 10

virtual INT CLOUDSSO_CALL FireGetGroup(int &iConnectionId, char* &lpszGroupId, char* &lpszExternalId, char* &lpszDisplayName, int &iStatusCode);
class SCIMDesktopGetGroupEventParams {
public:
  int connectionId();

  const QString& groupId();

  const QString& externalId();
  void setExternalId(const QString& qsExternalId);

  const QString& displayName();
  void setDisplayName(const QString& qsDisplayName);

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireGetGroup(SCIMDesktopGetGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void getGroup(SCIMDesktopGetGroupEventParams *e);

Remarks

This event fires when the class receives a GET /Groups/{id} request from the Identity Provider. It also fires before processing a PATCH /Groups/{id} request, or when the ETagEnabled configuration setting is true and a PUT /Groups/{id} or DELETE /Groups/{id} request includes an If-Match header. The GroupId parameter identifies the group to retrieve.

The DisplayName must be set to the group's display name. If an ExternalId was stored for this group, it must be set as well. To include group members in the response, the AddGroupMember method should be called once for each member. This event must supply the full group for a PATCH request to work correctly.

When the group is found, the StatusCode parameter must be set to 200. If the group is not found, StatusCode must be set to 404.

The RequestType property may be used to determine whether this event was fired by a direct GET request or internally before a PATCH or a conditional PUT/DELETE.

The StatusCode parameter defaults to 500, and a value of 0 is treated as 200.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

GetResourceTypes Event (SCIMDesktop Class)

Fired when a request for the resource type definitions is received.

Syntax

ANSI (Cross Platform)
virtual int FireGetResourceTypes(SCIMDesktopGetResourceTypesEventParams *e);
typedef struct {
int ConnectionId;
const char* ResponseBody; int lenResponseBody; int reserved; } SCIMDesktopGetResourceTypesEventParams;
Unicode (Windows) virtual INT FireGetResourceTypes(SCIMDesktopGetResourceTypesEventParams *e);
typedef struct {
INT ConnectionId;
LPCSTR ResponseBody; INT lenResponseBody; INT reserved; } SCIMDesktopGetResourceTypesEventParams;
#define EID_SCIMDESKTOP_GETRESOURCETYPES 11

virtual INT CLOUDSSO_CALL FireGetResourceTypes(int &iConnectionId, char* &lpResponseBody, INT &lenResponseBody);
class SCIMDesktopGetResourceTypesEventParams {
public:
  int connectionId();

  const QByteArray& responseBody();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireGetResourceTypes(SCIMDesktopGetResourceTypesEventParams *e) {...} // Or, connect one or more slots to this signal. void getResourceTypes(SCIMDesktopGetResourceTypesEventParams *e);

Remarks

This event fires when the class receives a GET /ResourceTypes request from the Identity Provider. The class returns the standard SCIM User and Group resource type definitions automatically and populates the ResponseBody parameter with the serialized JSON before firing this event.

This event is informational and may be used to log or audit discovery requests and inspect the generated response.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

GetSchemas Event (SCIMDesktop Class)

Fired when a request for the schema definitions is received.

Syntax

ANSI (Cross Platform)
virtual int FireGetSchemas(SCIMDesktopGetSchemasEventParams *e);
typedef struct {
int ConnectionId;
const char* ResponseBody; int lenResponseBody; int reserved; } SCIMDesktopGetSchemasEventParams;
Unicode (Windows) virtual INT FireGetSchemas(SCIMDesktopGetSchemasEventParams *e);
typedef struct {
INT ConnectionId;
LPCSTR ResponseBody; INT lenResponseBody; INT reserved; } SCIMDesktopGetSchemasEventParams;
#define EID_SCIMDESKTOP_GETSCHEMAS 12

virtual INT CLOUDSSO_CALL FireGetSchemas(int &iConnectionId, char* &lpResponseBody, INT &lenResponseBody);
class SCIMDesktopGetSchemasEventParams {
public:
  int connectionId();

  const QByteArray& responseBody();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireGetSchemas(SCIMDesktopGetSchemasEventParams *e) {...} // Or, connect one or more slots to this signal. void getSchemas(SCIMDesktopGetSchemasEventParams *e);

Remarks

This event fires when the class receives a GET /Schemas request from the Identity Provider. The class returns the standard SCIM User and Group schema definitions, including the enterprise user extension, automatically and populates the ResponseBody parameter with the serialized JSON before firing this event.

This event is informational and may be used to log or audit discovery requests and inspect the generated response.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

GetServiceProviderConfig Event (SCIMDesktop Class)

Fired when a request for the service provider configuration is received.

Syntax

ANSI (Cross Platform)
virtual int FireGetServiceProviderConfig(SCIMDesktopGetServiceProviderConfigEventParams *e);
typedef struct {
int ConnectionId;
const char* ResponseBody; int lenResponseBody; int reserved; } SCIMDesktopGetServiceProviderConfigEventParams;
Unicode (Windows) virtual INT FireGetServiceProviderConfig(SCIMDesktopGetServiceProviderConfigEventParams *e);
typedef struct {
INT ConnectionId;
LPCSTR ResponseBody; INT lenResponseBody; INT reserved; } SCIMDesktopGetServiceProviderConfigEventParams;
#define EID_SCIMDESKTOP_GETSERVICEPROVIDERCONFIG 13

virtual INT CLOUDSSO_CALL FireGetServiceProviderConfig(int &iConnectionId, char* &lpResponseBody, INT &lenResponseBody);
class SCIMDesktopGetServiceProviderConfigEventParams {
public:
  int connectionId();

  const QByteArray& responseBody();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireGetServiceProviderConfig(SCIMDesktopGetServiceProviderConfigEventParams *e) {...} // Or, connect one or more slots to this signal. void getServiceProviderConfig(SCIMDesktopGetServiceProviderConfigEventParams *e);

Remarks

This event fires when the class receives a GET /ServiceProviderConfig request from the Identity Provider. The class generates the configuration document automatically based on the SupportedOperations and MaxResults properties and populates the ResponseBody parameter with the serialized JSON before firing this event.

This event is informational and may be used to log or audit discovery requests and inspect the generated response.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

GetUser Event (SCIMDesktop Class)

Fired when a request to retrieve a user is received, before a PATCH user update, or when ETags are enabled and a PUT or DELETE request includes an If-Match header.

Syntax

ANSI (Cross Platform)
virtual int FireGetUser(SCIMDesktopGetUserEventParams *e);
typedef struct {
int ConnectionId;
const char* UserId;
char* ExternalId;
char* UserName;
char* GivenName;
char* FamilyName;
char* DisplayName;
int Active;
int StatusCode; int reserved; } SCIMDesktopGetUserEventParams;
Unicode (Windows) virtual INT FireGetUser(SCIMDesktopGetUserEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR UserId;
LPWSTR ExternalId;
LPWSTR UserName;
LPWSTR GivenName;
LPWSTR FamilyName;
LPWSTR DisplayName;
BOOL Active;
INT StatusCode; INT reserved; } SCIMDesktopGetUserEventParams;
#define EID_SCIMDESKTOP_GETUSER 14

virtual INT CLOUDSSO_CALL FireGetUser(int &iConnectionId, char* &lpszUserId, char* &lpszExternalId, char* &lpszUserName, char* &lpszGivenName, char* &lpszFamilyName, char* &lpszDisplayName, int &bActive, int &iStatusCode);
class SCIMDesktopGetUserEventParams {
public:
  int connectionId();

  const QString& userId();

  const QString& externalId();
  void setExternalId(const QString& qsExternalId);

  const QString& userName();
  void setUserName(const QString& qsUserName);

  const QString& givenName();
  void setGivenName(const QString& qsGivenName);

  const QString& familyName();
  void setFamilyName(const QString& qsFamilyName);

  const QString& displayName();
  void setDisplayName(const QString& qsDisplayName);

  bool active();
  void setActive(bool bActive);

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireGetUser(SCIMDesktopGetUserEventParams *e) {...} // Or, connect one or more slots to this signal. void getUser(SCIMDesktopGetUserEventParams *e);

Remarks

This event fires when the class receives a GET /Users/{id} request from the Identity Provider. It also fires before processing a PATCH /Users/{id} request, or when the ETagEnabled configuration setting is true and a PUT /Users/{id} or DELETE /Users/{id} request includes an If-Match header. The UserId parameter identifies the user to retrieve.

The output parameters (i.e., UserName, GivenName, FamilyName, DisplayName, Active) must be set to the current user data. If an ExternalId was stored for this user, it must be set as well. To include email addresses, phone numbers, and enterprise extension data in the response, the AddUserEmail, AddUserPhone, and AddUserExtension methods should be called once for each address, number, and user with extension data on record. This event must supply the full user for a PATCH request to work correctly.

When the user is found, the StatusCode parameter must be set to 200. If the user is not found, StatusCode must be set to 404.

The RequestType property may be used to determine whether this event was fired by a direct GET request or internally before a PATCH or a conditional PUT/DELETE.

The StatusCode parameter defaults to 500, and a value of 0 is treated as 200.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

ListGroups Event (SCIMDesktop Class)

Fired when a request to list groups is received.

Syntax

ANSI (Cross Platform)
virtual int FireListGroups(SCIMDesktopListGroupsEventParams *e);
typedef struct {
int ConnectionId;
const char* Filter;
const char* FilterAttribute;
const char* FilterOperator;
const char* FilterValue;
int StartIndex;
int Count;
int TotalResults;
int StatusCode; int reserved; } SCIMDesktopListGroupsEventParams;
Unicode (Windows) virtual INT FireListGroups(SCIMDesktopListGroupsEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR Filter;
LPCWSTR FilterAttribute;
LPCWSTR FilterOperator;
LPCWSTR FilterValue;
INT StartIndex;
INT Count;
INT TotalResults;
INT StatusCode; INT reserved; } SCIMDesktopListGroupsEventParams;
#define EID_SCIMDESKTOP_LISTGROUPS 15

virtual INT CLOUDSSO_CALL FireListGroups(int &iConnectionId, char* &lpszFilter, char* &lpszFilterAttribute, char* &lpszFilterOperator, char* &lpszFilterValue, int &iStartIndex, int &iCount, int &iTotalResults, int &iStatusCode);
class SCIMDesktopListGroupsEventParams {
public:
  int connectionId();

  const QString& filter();

  const QString& filterAttribute();

  const QString& filterOperator();

  const QString& filterValue();

  int startIndex();

  int count();

  int totalResults();
  void setTotalResults(int iTotalResults);

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireListGroups(SCIMDesktopListGroupsEventParams *e) {...} // Or, connect one or more slots to this signal. void listGroups(SCIMDesktopListGroupsEventParams *e);

Remarks

This event fires when the class receives a GET /Groups request from the Identity Provider. The Filter parameter contains the raw SCIM filter expression from the request, or "" (empty string) if no filter was specified. For simple single-term filters (e.g., displayName eq "Admins"), the FilterAttribute, FilterOperator, and FilterValue parameters are also populated with the parsed components for convenience. For compound or nested filter expressions, only Filter is populated. The application must parse it directly.

The StartIndex and Count parameters reflect the pagination values from the request. StartIndex is 1-based, and Count is capped by the value of the MaxResults property. When the Identity Provider does not include a count parameter, Count defaults to MaxResults. The application should use these values to query its data source and return only the matching page of results. The sortBy and sortOrder query parameters are not currently supported and are ignored when received.

The AddGroup method must be called once for each group in the current page of results, after which the TotalResults parameter must be set to the total number of matching groups across all pages. To include members for each group, the AddGroupMember method may be called as needed. The StatusCode must be set to 200 when the operation succeeds.

To signal an error, StatusCode must be set to the appropriate HTTP status code. The StatusCode parameter defaults to 500, and a value of 0 is treated as 200.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

ListUsers Event (SCIMDesktop Class)

Fired when a request to list users is received.

Syntax

ANSI (Cross Platform)
virtual int FireListUsers(SCIMDesktopListUsersEventParams *e);
typedef struct {
int ConnectionId;
const char* Filter;
const char* FilterAttribute;
const char* FilterOperator;
const char* FilterValue;
int StartIndex;
int Count;
int TotalResults;
int StatusCode; int reserved; } SCIMDesktopListUsersEventParams;
Unicode (Windows) virtual INT FireListUsers(SCIMDesktopListUsersEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR Filter;
LPCWSTR FilterAttribute;
LPCWSTR FilterOperator;
LPCWSTR FilterValue;
INT StartIndex;
INT Count;
INT TotalResults;
INT StatusCode; INT reserved; } SCIMDesktopListUsersEventParams;
#define EID_SCIMDESKTOP_LISTUSERS 16

virtual INT CLOUDSSO_CALL FireListUsers(int &iConnectionId, char* &lpszFilter, char* &lpszFilterAttribute, char* &lpszFilterOperator, char* &lpszFilterValue, int &iStartIndex, int &iCount, int &iTotalResults, int &iStatusCode);
class SCIMDesktopListUsersEventParams {
public:
  int connectionId();

  const QString& filter();

  const QString& filterAttribute();

  const QString& filterOperator();

  const QString& filterValue();

  int startIndex();

  int count();

  int totalResults();
  void setTotalResults(int iTotalResults);

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireListUsers(SCIMDesktopListUsersEventParams *e) {...} // Or, connect one or more slots to this signal. void listUsers(SCIMDesktopListUsersEventParams *e);

Remarks

This event fires when the class receives a GET /Users request from the Identity Provider. The Filter parameter contains the raw SCIM filter expression from the request, or "" (empty string) if no filter was specified. For simple single-term filters (e.g., userName eq "jsmith"), the FilterAttribute, FilterOperator, and FilterValue parameters are also populated with the parsed components for convenience. For compound or nested filter expressions, only Filter is populated. The application must parse it directly.

The StartIndex and Count parameters reflect the pagination values from the request. StartIndex is 1-based, and Count is capped by the value of the MaxResults property. When the Identity Provider does not include a count parameter, Count defaults to MaxResults. The application should use these values to query its data source and return only the matching page of results. The sortBy and sortOrder query parameters are not currently supported and are ignored when received.

The AddUser method must be called once for each user in the current page of results. To include email addresses, phone numbers, or enterprise extension data for each user, the AddUserEmail, AddUserPhone, and AddUserExtension methods may be called as needed. After all users have been added, the TotalResults parameter must be set to the total number of matching users across all pages. This value may be greater than Count if the result set is paginated. The StatusCode must be set to 200 when the operation succeeds.

To signal an error, StatusCode must be set to the appropriate HTTP status code. The StatusCode parameter defaults to 500, and a value of 0 is treated as 200.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

Log Event (SCIMDesktop Class)

Fired once for each log message.

Syntax

ANSI (Cross Platform)
virtual int FireLog(SCIMDesktopLogEventParams *e);
typedef struct {
int ConnectionId;
int LogLevel;
const char* Message;
const char* LogType; int reserved; } SCIMDesktopLogEventParams;
Unicode (Windows) virtual INT FireLog(SCIMDesktopLogEventParams *e);
typedef struct {
INT ConnectionId;
INT LogLevel;
LPCWSTR Message;
LPCWSTR LogType; INT reserved; } SCIMDesktopLogEventParams;
#define EID_SCIMDESKTOP_LOG 17

virtual INT CLOUDSSO_CALL FireLog(int &iConnectionId, int &iLogLevel, char* &lpszMessage, char* &lpszLogType);
class SCIMDesktopLogEventParams {
public:
  int connectionId();

  int logLevel();

  const QString& message();

  const QString& logType();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireLog(SCIMDesktopLogEventParams *e) {...} // Or, connect one or more slots to this signal. void log(SCIMDesktopLogEventParams *e);

Remarks

This event fires once for each log message generated by the class while it processes a SCIM request. This includes messages from the built-in HTTP server about the HTTP messages exchanged with the Identity Provider. The verbosity is controlled by the LogLevel configuration setting.

LogLevel indicates the level of the message. Possible values are as follows:

0 (None) No messages are logged.
1 (Info - default) Each request received, its completion status, and the result of authenticating the request are logged. The HTTP request line and headers, and the HTTP status line and response headers, are also logged.
2 (Verbose) Equivalent to 1 (Info) for this class. No additional detail is logged at this level.
3 (Debug) Additionally logs which event (e.g., CreateUser or ListGroups) is about to be invoked to handle the current request, and the HTTP request and response bodies.

Message is the log entry.

LogType identifies the type of log entry. Possible values are as follows:

  • "SCIM": Messages about processing the SCIM request, such as the authentication result and the event being invoked.
  • "HTTPConnection": The HTTP messages exchanged with the Identity Provider.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

SSLClientAuthentication Event (SCIMDesktop Class)

This event is fired when the client presents its credentials to the server.

Syntax

ANSI (Cross Platform)
virtual int FireSSLClientAuthentication(SCIMDesktopSSLClientAuthenticationEventParams *e);
typedef struct {
int ConnectionId;
const char* CertEncoded; int lenCertEncoded;
const char* CertSubject;
const char* CertIssuer;
const char* Status;
int Accept; int reserved; } SCIMDesktopSSLClientAuthenticationEventParams;
Unicode (Windows) virtual INT FireSSLClientAuthentication(SCIMDesktopSSLClientAuthenticationEventParams *e);
typedef struct {
INT ConnectionId;
LPCSTR CertEncoded; INT lenCertEncoded;
LPCWSTR CertSubject;
LPCWSTR CertIssuer;
LPCWSTR Status;
BOOL Accept; INT reserved; } SCIMDesktopSSLClientAuthenticationEventParams;
#define EID_SCIMDESKTOP_SSLCLIENTAUTHENTICATION 18

virtual INT CLOUDSSO_CALL FireSSLClientAuthentication(int &iConnectionId, char* &lpCertEncoded, INT &lenCertEncoded, char* &lpszCertSubject, char* &lpszCertIssuer, char* &lpszStatus, int &bAccept);
class SCIMDesktopSSLClientAuthenticationEventParams {
public:
  int connectionId();

  const QByteArray& certEncoded();

  const QString& certSubject();

  const QString& certIssuer();

  const QString& status();

  bool accept();
  void setAccept(bool bAccept);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireSSLClientAuthentication(SCIMDesktopSSLClientAuthenticationEventParams *e) {...} // Or, connect one or more slots to this signal. void SSLClientAuthentication(SCIMDesktopSSLClientAuthenticationEventParams *e);

Remarks

This event enables the server to decide whether or not to continue. The Accept parameter is a recommendation on whether to continue or to close the connection. This is just a suggestion: application software must use its own logic to determine whether or not to continue.

When Accept is False, Status shows why the verification failed (otherwise, Status contains the string "OK").

SSLConnectionRequest Event (SCIMDesktop Class)

This event fires when a Secure Sockets Layer (SSL) connection is requested.

Syntax

ANSI (Cross Platform)
virtual int FireSSLConnectionRequest(SCIMDesktopSSLConnectionRequestEventParams *e);
typedef struct {
int ConnectionId;
const char* SupportedCipherSuites;
const char* SupportedSignatureAlgs;
int CertStoreType;
char* CertStore;
char* CertPassword;
char* CertSubject; int reserved; } SCIMDesktopSSLConnectionRequestEventParams;
Unicode (Windows) virtual INT FireSSLConnectionRequest(SCIMDesktopSSLConnectionRequestEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR SupportedCipherSuites;
LPCWSTR SupportedSignatureAlgs;
INT CertStoreType;
LPWSTR CertStore;
LPWSTR CertPassword;
LPWSTR CertSubject; INT reserved; } SCIMDesktopSSLConnectionRequestEventParams;
#define EID_SCIMDESKTOP_SSLCONNECTIONREQUEST 19

virtual INT CLOUDSSO_CALL FireSSLConnectionRequest(int &iConnectionId, char* &lpszSupportedCipherSuites, char* &lpszSupportedSignatureAlgs, int &iCertStoreType, char* &lpszCertStore, char* &lpszCertPassword, char* &lpszCertSubject);
class SCIMDesktopSSLConnectionRequestEventParams {
public:
  int connectionId();

  const QString& supportedCipherSuites();

  const QString& supportedSignatureAlgs();

  int certStoreType();
  void setCertStoreType(int iCertStoreType);

  const QString& certStore();
  void setCertStore(const QString& qsCertStore);

  const QString& certPassword();
  void setCertPassword(const QString& qsCertPassword);

  const QString& certSubject();
  void setCertSubject(const QString& qsCertSubject);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireSSLConnectionRequest(SCIMDesktopSSLConnectionRequestEventParams *e) {...} // Or, connect one or more slots to this signal. void SSLConnectionRequest(SCIMDesktopSSLConnectionRequestEventParams *e);

Remarks

This event fires when an SSL connection is requested and SSLProvider is set to Internal. This event provides an opportunity to select an alternative certificate to the connecting client. This event does not fire when SSLProvider is set to Platform.

This event allows the class to be configured to use both RSA and ECDSA certificates depending on the connecting client's capabilities.

ConnectionId is the connection Id of the client requesting the connection.

SupportedCipherSuites is a comma-separated list of cipher suites that the client supports.

SupportedSignatureAlgs is a comma-separated list of certificate signature algorithms that the client supports.

CertStoreType is the store type of the alternate certificate to use for this connection. The class supports both public and private keys in a variety of formats. When the cstAuto value is used, the class will automatically determine the type. This field can take one of the following values:

0 (cstUser - default)For Windows, this specifies that the certificate store is a certificate store owned by the current user.

NOTE: This store type is not available in Java.

1 (cstMachine)For Windows, this specifies that the certificate store is a machine store.

NOTE: This store type is not available in Java.

2 (cstPFXFile)The certificate store is the name of a PFX (PKCS#12) file containing certificates.
3 (cstPFXBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format.
4 (cstJKSFile)The certificate store is the name of a Java Key Store (JKS) file containing certificates.

NOTE: This store type is only available in Java.

5 (cstJKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.

NOTE: This store type is only available in Java.

6 (cstPEMKeyFile)The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
7 (cstPEMKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate.
8 (cstPublicKeyFile)The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
9 (cstPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate.
10 (cstSSHPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key.
11 (cstP7BFile)The certificate store is the name of a PKCS#7 file containing certificates.
12 (cstP7BBlob)The certificate store is a string (binary) representing a certificate store in PKCS#7 format.
13 (cstSSHPublicKeyFile)The certificate store is the name of a file that contains an SSH-style public key.
14 (cstPPKFile)The certificate store is the name of a file that contains a PPK (PuTTY Private Key).
15 (cstPPKBlob)The certificate store is a string (binary) that contains a PPK (PuTTY Private Key).
16 (cstXMLFile)The certificate store is the name of a file that contains a certificate in XML format.
17 (cstXMLBlob)The certificate store is a string that contains a certificate in XML format.
18 (cstJWKFile)The certificate store is the name of a file that contains a JWK (JSON Web Key).
19 (cstJWKBlob)The certificate store is a string that contains a JWK (JSON Web Key).
21 (cstBCFKSFile)The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).

NOTE: This store type is only available in Java and .NET.

22 (cstBCFKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.

NOTE: This store type is only available in Java and .NET.

23 (cstPKCS11)The certificate is present on a physical security key accessible via a PKCS#11 interface.

To use a security key, create a new Certificate object and pass cstPKCS11 as the StoreType, the full path of the PKCS#11 DLL as the Store, and the PIN as the StorePassword.

Code Example. SSH Authentication with Security Key (without CertMgr): sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll", "123456", // PIN "CN=cert_subject"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

Alternatively, collect the necessary data using the CertMgr class by calling the ListStoreCertificates method after setting the corresponding properties accordingly. The certificate information returned in the CertList event's CertEncoded parameter may be saved for later use.

When using a certificate obtained with this approach, pass the previously saved security key information as the Store and set StorePassword to the PIN.

Code Example. SSH Authentication with Security Key (with CertMgr): certmgr.CertStoreType = CertStoreTypes.cstPKCS11; certmgr.OnCertList += (s, e) => { secKeyBlob = e.CertEncoded; }; certmgr.CertStore = @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll"; certmgr.CertStorePassword = "123456"; // PIN certmgr.ListStoreCertificates(); sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, secKeyBlob, "123456", "*"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

99 (cstAuto)The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically.

CertStore is the store name or location of the alternate certificate to use for this connection.

Designations of certificate stores are platform dependent.

The following designations are the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.

When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).

CertPassword is the password of the certificate store containing the alternate certificate to use for this connection.

CertSubject is the subject of the alternate certificate to use for this connection.

The special value * matches any subject and will select the first certificate in the store. The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=example@email.com". Common fields and their meanings are as follows:

FieldMeaning
CNCommon Name. This is commonly a hostname like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma, it must be quoted.

SSLStatus Event (SCIMDesktop Class)

This event is fired to show the progress of the secure connection.

Syntax

ANSI (Cross Platform)
virtual int FireSSLStatus(SCIMDesktopSSLStatusEventParams *e);
typedef struct {
int ConnectionId;
const char* Message; int reserved; } SCIMDesktopSSLStatusEventParams;
Unicode (Windows) virtual INT FireSSLStatus(SCIMDesktopSSLStatusEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR Message; INT reserved; } SCIMDesktopSSLStatusEventParams;
#define EID_SCIMDESKTOP_SSLSTATUS 20

virtual INT CLOUDSSO_CALL FireSSLStatus(int &iConnectionId, char* &lpszMessage);
class SCIMDesktopSSLStatusEventParams {
public:
  int connectionId();

  const QString& message();

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireSSLStatus(SCIMDesktopSSLStatusEventParams *e) {...} // Or, connect one or more slots to this signal. void SSLStatus(SCIMDesktopSSLStatusEventParams *e);

Remarks

The event is fired for informational and logging purposes only. It is used to track the progress of the connection.

UpdateGroup Event (SCIMDesktop Class)

Fired after the current group has been loaded and a replace or update request has been applied.

Syntax

ANSI (Cross Platform)
virtual int FireUpdateGroup(SCIMDesktopUpdateGroupEventParams *e);
typedef struct {
int ConnectionId;
const char* GroupId;
const char* ExternalId;
const char* DisplayName;
int StatusCode; int reserved; } SCIMDesktopUpdateGroupEventParams;
Unicode (Windows) virtual INT FireUpdateGroup(SCIMDesktopUpdateGroupEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR GroupId;
LPCWSTR ExternalId;
LPCWSTR DisplayName;
INT StatusCode; INT reserved; } SCIMDesktopUpdateGroupEventParams;
#define EID_SCIMDESKTOP_UPDATEGROUP 21

virtual INT CLOUDSSO_CALL FireUpdateGroup(int &iConnectionId, char* &lpszGroupId, char* &lpszExternalId, char* &lpszDisplayName, int &iStatusCode);
class SCIMDesktopUpdateGroupEventParams {
public:
  int connectionId();

  const QString& groupId();

  const QString& externalId();

  const QString& displayName();

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireUpdateGroup(SCIMDesktopUpdateGroupEventParams *e) {...} // Or, connect one or more slots to this signal. void updateGroup(SCIMDesktopUpdateGroupEventParams *e);

Remarks

This event fires when the class receives a PUT /Groups/{id} or PATCH /Groups/{id} request from the Identity Provider. For PUT, the event parameters reflect the full group representation from the request body directly. For PATCH, the class first retrieves the current group via the GetGroup event, applies the patch operations, then fires this event.

For a PUT request, the ExternalId parameter contains the externalId value from the request body, or "" (empty string) if not provided.

For a PUT request, the provided DisplayName and member list should be applied to the group identified by GroupId, and any attributes not present in the request should be cleared. For a PATCH request, the event parameters likewise reflect the complete final group, with the values loaded through the GetGroup event and the patch operations applied on top. All parameters should be applied in the same way, since any attribute the patch did not touch carries its original value.

Updated members are made available via the GroupMembers collection. The collection always reflects the full current member list after the request is applied. All stored members should be replaced with the collection contents.

When the update succeeds, StatusCode must be set to 200. It may also be set to 204, which is valid when the updated resource does not need to be returned, causing the class to return a 204 No Content response with no body. Some Identity Providers require a 200 response with the updated resource body. Check your Identity Provider's SCIM implementation guide before returning 204. If the group is not found, StatusCode must be set to 404. The StatusCode parameter defaults to 500, and a value of 0 is treated as 200.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

UpdateUser Event (SCIMDesktop Class)

Fired after the current user has been loaded and a replace or update request has been applied.

Syntax

ANSI (Cross Platform)
virtual int FireUpdateUser(SCIMDesktopUpdateUserEventParams *e);
typedef struct {
int ConnectionId;
const char* UserId;
const char* ExternalId;
const char* UserName;
const char* GivenName;
const char* FamilyName;
const char* DisplayName;
int Active;
int StatusCode; int reserved; } SCIMDesktopUpdateUserEventParams;
Unicode (Windows) virtual INT FireUpdateUser(SCIMDesktopUpdateUserEventParams *e);
typedef struct {
INT ConnectionId;
LPCWSTR UserId;
LPCWSTR ExternalId;
LPCWSTR UserName;
LPCWSTR GivenName;
LPCWSTR FamilyName;
LPCWSTR DisplayName;
BOOL Active;
INT StatusCode; INT reserved; } SCIMDesktopUpdateUserEventParams;
#define EID_SCIMDESKTOP_UPDATEUSER 22

virtual INT CLOUDSSO_CALL FireUpdateUser(int &iConnectionId, char* &lpszUserId, char* &lpszExternalId, char* &lpszUserName, char* &lpszGivenName, char* &lpszFamilyName, char* &lpszDisplayName, int &bActive, int &iStatusCode);
class SCIMDesktopUpdateUserEventParams {
public:
  int connectionId();

  const QString& userId();

  const QString& externalId();

  const QString& userName();

  const QString& givenName();

  const QString& familyName();

  const QString& displayName();

  bool active();

  int statusCode();
  void setStatusCode(int iStatusCode);

  int eventRetVal();
  void setEventRetVal(int iRetVal);
};
// To handle, subclass SCIMDesktop and override this emitter function. virtual int fireUpdateUser(SCIMDesktopUpdateUserEventParams *e) {...} // Or, connect one or more slots to this signal. void updateUser(SCIMDesktopUpdateUserEventParams *e);

Remarks

This event fires when the class receives a PUT /Users/{id} or PATCH /Users/{id} request from the Identity Provider. For PUT, the event parameters reflect the full user representation from the request body directly. For PATCH, the class first retrieves the current user via the GetUser event, applies the patch operations, then fires this event.

For a PUT request, the ExternalId parameter contains the externalId value from the request body, or "" (empty string) if not provided.

For a PUT request, all event parameters should be applied to the user identified by UserId, and any attributes not present in the request should be cleared. For a PATCH request, the event parameters likewise reflect the complete final user, with the values loaded through the GetUser event and the patch operations applied on top. All parameters should be applied in the same way, since any attribute the patch did not touch carries its original value.

The Active parameter reflects the user's active state. For a PUT request, Active defaults to true if active is absent from the request body.

Email addresses and phone numbers are made available via the UserEmails and UserPhones collections. The collections always reflect the full current state of the user after the request is applied. All stored entries should be replaced with the collection contents. Enterprise extension attributes are made available via the UserExtension property and likewise reflect the full current state after the request is applied.

When the update succeeds, StatusCode must be set to 200. It may also be set to 204, which is valid when the updated resource does not need to be returned, causing the class to return a 204 No Content response with no body. Some Identity Providers require a 200 response with the updated resource body. Check your Identity Provider's SCIM implementation guide before returning 204. If the user is not found, StatusCode must be set to 404. The StatusCode parameter defaults to 500, and a value of 0 is treated as 200.

The ConnectionId parameter identifies the client connection. The value is first provided by the Connected event and may be used to correlate events that are fired for the same connection.

Certificate Type

This is the digital certificate being used.

Syntax

CloudSSOCertificate (declared in cloudsso.h)

Remarks

This type describes the current digital certificate. The certificate may be a public or private key. The fields are used to identify or select certificates.

The following fields are available:

Fields

EffectiveDate
char* (read-only)

Default Value: ""

The date on which this certificate becomes valid. Before this date, it is not valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2000 15:00:00.

ExpirationDate
char* (read-only)

Default Value: ""

The date on which the certificate expires. After this date, the certificate will no longer be valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2001 15:00:00.

ExtendedKeyUsage
char* (read-only)

Default Value: ""

A comma-delimited list of extended key usage identifiers. These are the same as ASN.1 object identifiers (OIDs).

Fingerprint
char* (read-only)

Default Value: ""

The hex-encoded, 16-byte MD5 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: bc:2a:72:af:fe:58:17:43:7a:5f:ba:5a:7c:90:f7:02

FingerprintSHA1
char* (read-only)

Default Value: ""

The hex-encoded, 20-byte SHA-1 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 30:7b:fa:38:65:83:ff:da:b4:4e:07:3f:17:b8:a4:ed:80:be:ff:84

FingerprintSHA256
char* (read-only)

Default Value: ""

The hex-encoded, 32-byte SHA-256 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 6a:80:5c:33:a9:43:ea:b0:96:12:8a:64:96:30:ef:4a:8a:96:86:ce:f4:c7:be:10:24:8e:2b:60:9e:f3:59:53

Issuer
char* (read-only)

Default Value: ""

The issuer of the certificate. This field contains a string representation of the name of the issuing authority for the certificate.

PrivateKey
char* (read-only)

Default Value: ""

The private key of the certificate (if available). The key is provided as PEM/Base64-encoded data.

NOTE: The PrivateKey may be available but not exportable. In this case, PrivateKey returns an empty string.

PrivateKeyAvailable
int (read-only)

Default Value: FALSE

Whether a PrivateKey is available for the selected certificate. If PrivateKeyAvailable is True, the certificate may be used for authentication purposes (e.g., server authentication).

PrivateKeyContainer
char* (read-only)

Default Value: ""

The name of the PrivateKey container for the certificate (if available). This functionality is available only on Windows platforms.

PublicKey
char* (read-only)

Default Value: ""

The public key of the certificate. The key is provided as PEM/Base64-encoded data.

PublicKeyAlgorithm
char* (read-only)

Default Value: ""

The textual description of the certificate's public key algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_DH") or an object identifier (OID) string representing the algorithm.

PublicKeyLength
int (read-only)

Default Value: 0

The length of the certificate's public key (in bits). Common values are 512, 1024, and 2048.

SerialNumber
char* (read-only)

Default Value: ""

The serial number of the certificate encoded as a string. The number is encoded as a series of hexadecimal digits, with each pair representing a byte of the serial number.

SignatureAlgorithm
char* (read-only)

Default Value: ""

The text description of the certificate's signature algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_MD5RSA") or an object identifier (OID) string representing the algorithm.

Store
char*

Default Value: "MY"

The name of the certificate store for the client certificate.

The StoreType field denotes the type of the certificate store specified by Store. If the store is password-protected, specify the password in StorePassword.

Store is used in conjunction with the Subject field to specify client certificates. If Store has a value, and Subject or Encoded is set, a search for a certificate is initiated. Please see the Subject field for details.

Designations of certificate stores are platform dependent.

The following designations are the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.

When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).

StorePassword
char*

Default Value: ""

If the type of certificate store requires a password, this field is used to specify the password needed to open the certificate store.

StoreType
int

Default Value: 0

The type of certificate store for this certificate.

The class supports both public and private keys in a variety of formats. When the cstAuto value is used, the class will automatically determine the type. This field can take one of the following values:

0 (cstUser - default)For Windows, this specifies that the certificate store is a certificate store owned by the current user.

NOTE: This store type is not available in Java.

1 (cstMachine)For Windows, this specifies that the certificate store is a machine store.

NOTE: This store type is not available in Java.

2 (cstPFXFile)The certificate store is the name of a PFX (PKCS#12) file containing certificates.
3 (cstPFXBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format.
4 (cstJKSFile)The certificate store is the name of a Java Key Store (JKS) file containing certificates.

NOTE: This store type is only available in Java.

5 (cstJKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.

NOTE: This store type is only available in Java.

6 (cstPEMKeyFile)The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
7 (cstPEMKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate.
8 (cstPublicKeyFile)The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
9 (cstPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate.
10 (cstSSHPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key.
11 (cstP7BFile)The certificate store is the name of a PKCS#7 file containing certificates.
12 (cstP7BBlob)The certificate store is a string (binary) representing a certificate store in PKCS#7 format.
13 (cstSSHPublicKeyFile)The certificate store is the name of a file that contains an SSH-style public key.
14 (cstPPKFile)The certificate store is the name of a file that contains a PPK (PuTTY Private Key).
15 (cstPPKBlob)The certificate store is a string (binary) that contains a PPK (PuTTY Private Key).
16 (cstXMLFile)The certificate store is the name of a file that contains a certificate in XML format.
17 (cstXMLBlob)The certificate store is a string that contains a certificate in XML format.
18 (cstJWKFile)The certificate store is the name of a file that contains a JWK (JSON Web Key).
19 (cstJWKBlob)The certificate store is a string that contains a JWK (JSON Web Key).
21 (cstBCFKSFile)The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).

NOTE: This store type is only available in Java and .NET.

22 (cstBCFKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.

NOTE: This store type is only available in Java and .NET.

23 (cstPKCS11)The certificate is present on a physical security key accessible via a PKCS#11 interface.

To use a security key, create a new Certificate object and pass cstPKCS11 as the StoreType, the full path of the PKCS#11 DLL as the Store, and the PIN as the StorePassword.

Code Example. SSH Authentication with Security Key (without CertMgr): sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll", "123456", // PIN "CN=cert_subject"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

Alternatively, collect the necessary data using the CertMgr class by calling the ListStoreCertificates method after setting the corresponding properties accordingly. The certificate information returned in the CertList event's CertEncoded parameter may be saved for later use.

When using a certificate obtained with this approach, pass the previously saved security key information as the Store and set StorePassword to the PIN.

Code Example. SSH Authentication with Security Key (with CertMgr): certmgr.CertStoreType = CertStoreTypes.cstPKCS11; certmgr.OnCertList += (s, e) => { secKeyBlob = e.CertEncoded; }; certmgr.CertStore = @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll"; certmgr.CertStorePassword = "123456"; // PIN certmgr.ListStoreCertificates(); sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, secKeyBlob, "123456", "*"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

99 (cstAuto)The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically.

SubjectAltNames
char* (read-only)

Default Value: ""

Comma-separated lists of alternative subject names for the certificate.

ThumbprintMD5
char* (read-only)

Default Value: ""

The MD5 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

ThumbprintSHA1
char* (read-only)

Default Value: ""

The SHA-1 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

ThumbprintSHA256
char* (read-only)

Default Value: ""

The SHA-256 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

Usage
char* (read-only)

Default Value: ""

The text description of UsageFlags.

This value will be one or more of the following strings and will be separated by commas:

  • Digital Signature
  • Non-Repudiation
  • Key Encipherment
  • Data Encipherment
  • Key Agreement
  • Certificate Signing
  • CRL Signing
  • Encipher Only

If the provider is OpenSSL, the value is a comma-separated list of X.509 certificate extension names.

UsageFlags
int (read-only)

Default Value: 0

The flags that show intended use for the certificate. The value of UsageFlags is a combination of the following flags:

0x80Digital Signature
0x40Non-Repudiation
0x20Key Encipherment
0x10Data Encipherment
0x08Key Agreement
0x04Certificate Signing
0x02CRL Signing
0x01Encipher Only

Please see the Usage field for a text representation of UsageFlags.

This functionality currently is not available when the provider is OpenSSL.

Version
char* (read-only)

Default Value: ""

The certificate's version number. The possible values are the strings "V1", "V2", and "V3".

Subject
char*

Default Value: ""

The subject of the certificate used for client authentication.

This property must be set after all other certificate properties are set. When this property is set, a search is performed in the current certificate store to locate a certificate with a matching subject.

If a matching certificate is found, the field is set to the full subject of the matching certificate.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=example@email.com". Common fields and their meanings are as follows:

FieldMeaning
CNCommon Name. This is commonly a hostname like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma, it must be quoted.

Encoded
char*

Default Value: ""

The certificate (PEM/Base64 encoded). This field is used to assign a specific certificate. The Store and Subject fields also may be used to specify a certificate.

When Encoded is set, a search is initiated in the current Store for the private key of the certificate. If the key is found, Subject is updated to reflect the full subject of the selected certificate; otherwise, Subject is set to an empty string.

Constructors

Certificate()
            

Creates a Certificate instance whose properties can be set.

Certificate(const char* lpEncoded, int lenEncoded)
            

Parses Encoded as an X.509 public key.

Certificate(int iStoreType, const char* lpStore, int lenStore, const char* lpszStorePassword, const char* lpszSubject)
            

StoreType identifies the type of certificate store to use. See StoreType for descriptions of the different certificate stores. Store is a byte array containing the certificate data. StorePassword is the password used to protect the store.

After the store has been successfully opened, the class will attempt to find the certificate identified by Subject. This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN). The Subject parameter can also take an MD5, SHA-1, or SHA-256 thumbprint of the certificate to load in a "Thumbprint=value" format.

SCIMEmail Type

An email address associated with a SCIM user.

Syntax

CloudSSOSCIMEmail (declared in cloudsso.h)

Remarks

This type represents a single email address entry in a SCIM user resource, including its type classification and whether it is the primary address.

The following fields are available:

Fields

Address
char* (read-only)

Default Value: ""

The email address.

This field contains the email address value.

EmailType
char* (read-only)

Default Value: ""

The type of email address.

This field classifies the email address. Common values include work, home, and other.

Primary
int (read-only)

Default Value: FALSE

Whether this is the primary email address.

This field indicates whether this email address is the user's primary address. Only one entry in the collection should have Primary set to true.

Constructors

SCIMEmail()
            

SCIMExtension Type

Enterprise extension attributes associated with a SCIM user.

Syntax

CloudSSOSCIMExtension (declared in cloudsso.h)

Remarks

This type represents the enterprise extension attributes defined by the urn:ietf:params:scim:schemas:extension:enterprise:2.0:User schema. It is exposed via the UserExtension property during create and update events, and populated via the AddUserExtension method in get and list events.

The following fields are available:

Fields

CostCenter
char* (read-only)

Default Value: ""

The user's cost center.

This field identifies the cost center the user is associated with.

Department
char* (read-only)

Default Value: ""

The user's department.

This field contains the name of the department the user belongs to.

Division
char* (read-only)

Default Value: ""

The user's division.

This field contains the name of the division the user belongs to within the organization.

EmployeeNumber
char* (read-only)

Default Value: ""

The user's employee number.

This field contains a string identifier for the user within the organization, such as a payroll or HR system identifier.

ManagerDisplayName
char* (read-only)

Default Value: ""

The display name of the user's manager.

This field contains the human-readable name of the manager. It corresponds to the displayName sub-attribute of the manager complex attribute in the enterprise extension schema.

ManagerId
char* (read-only)

Default Value: ""

The user identifier of the user's manager.

This field contains the identifier of the manager's user resource within the application. It corresponds to the value sub-attribute of the manager complex attribute in the enterprise extension schema.

ManagerRef
char* (read-only)

Default Value: ""

The URI of the manager's user resource.

This field contains the full URI reference to the manager's user resource (e.g., /scim/v2/Users/{id}). It corresponds to the $ref sub-attribute of the manager complex attribute in the enterprise extension schema.

Organization
char* (read-only)

Default Value: ""

The user's organization.

This field contains the name of the organization the user belongs to.

Constructors

SCIMExtension()
            

SCIMMember Type

A member entry associated with a SCIM group.

Syntax

CloudSSOSCIMMember (declared in cloudsso.h)

Remarks

This type represents a single member of a SCIM group resource, including the member's resource ID and display name.

The following fields are available:

Fields

MemberDisplay
char* (read-only)

Default Value: ""

The display name of the group member.

This field contains the display name of the member user as provided by the Identity Provider. It may be empty if the Identity Provider did not supply a display name.

MemberId
char* (read-only)

Default Value: ""

The SCIM resource ID of the group member.

This field contains the unique identifier of the member user as assigned by the service provider.

Constructors

SCIMMember()
            

SCIMPhone Type

A phone number associated with a SCIM user.

Syntax

CloudSSOSCIMPhone (declared in cloudsso.h)

Remarks

This type represents a single phone number entry in a SCIM user resource, including its type classification and whether it is the primary number.

The following fields are available:

Fields

Number
char* (read-only)

Default Value: ""

The phone number.

This field contains the phone number value.

PhoneType
char* (read-only)

Default Value: ""

The type of phone number.

This field classifies the phone number. Common values include work, mobile, home, and other.

Primary
int (read-only)

Default Value: FALSE

Whether this is the primary phone number.

This field indicates whether this phone number is the user's primary number. Only one entry in the collection should have Primary set to true.

Constructors

SCIMPhone()
            

CloudSSOList Type

Syntax

CloudSSOList<T> (declared in cloudsso.h)

Remarks

CloudSSOList is a generic class that is used to hold a collection of objects of type T, where T is one of the custom types supported by the SCIMDesktop class.

Methods

GetCount This method returns the current size of the collection.

int GetCount() {}

SetCount This method sets the size of the collection. This method returns 0 if setting the size was successful; or -1 if the collection is ReadOnly. When adding additional objects to a collection call this method to specify the new size. Increasing the size of the collection preserves existing objects in the collection.

int SetCount(int count) {}

Get This method gets the item at the specified position. The index parameter specifies the index of the item in the collection. This method returns NULL if an invalid index is specified.

T* Get(int index) {}

Set This method sets the item at the specified position. The index parameter specifies the index of the item in the collection that is being set. This method returns -1 if an invalid index is specified. Note: Objects created using the new operator must be freed using the delete operator; they will not be automatically freed by the class.

T* Set(int index, T* value) {}

Config Settings (SCIMDesktop Class)

The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

SCIMDesktop Config Settings

AllowedClients:   A comma-separated list of IP addresses or hostnames allowed to connect.

This setting restricts incoming connections to the specified addresses. Wildcards are supported (e.g., 192.168.1.*).

The default value * allows all clients. The BlockedClients configuration setting may instead be used to deny specific addresses while allowing all others.

BlockedClients:   A comma-separated list of IP addresses or hostnames that are denied connections.

This setting denies incoming connections from the specified addresses. Wildcards are supported.

This setting takes precedence over the AllowedClients configuration setting.

ETagEnabled:   Whether to include ETag headers in user and group responses.

When enabled, the class generates an ETag header by calculating a SHA-256 hash of the response body. It includes this header in 200 and 201 responses for individual user and group resources. The class validates an If-Match request header on PUT, PATCH, and DELETE requests.

A missing header does not prevent the operation. When supplied, the header must equal the current ETag or be *. A non-matching value returns 412 Precondition Failed before the update or delete event fires.

On a GET /Users/{id} or GET /Groups/{id} request, the class also compares an incoming If-None-Match header against the current resource's ETag. When the header is present and equals the current ETag or *, a 304 Not Modified response is returned with no body instead of the resource representation.

This feature is disabled by default and should be enabled if the connecting Identity Provider requires versioned resources.

IgnoreUnknownPatchAttributes:   Whether to ignore PATCH operations that target unsupported attributes.

When enabled, the class skips PATCH operations that target attribute paths it does not support instead of returning a 400 response. Supported operations in the same request are still applied, and the update event still fires. The application can inspect the complete request through the RequestBody and JSON XPath configuration settings to process unsupported attributes itself. Unsupported attributes are not included in the response.

This setting does not suppress errors for a missing PatchOp schema, an empty Operations array, or an invalid operation name.

When the LogLevel configuration setting is set to 3, each ignored attribute path is recorded through the Log event. Attribute values and filter values are not included in this log entry.

LogLevel:   Controls the level of detail that is logged through the Log event.

This setting controls the level of detail that is logged through the Log event. Possible values are 0 (None), 1 (Info), 2 (Verbose), and 3 (Debug). The messages logged at each level are described in the Log event.

RequestBody:   The body of the most recently received SCIM request.

This read-only configuration setting contains the raw body of the most recently received SCIM request.

UseIPv6:   Controls IPv4/IPv6 listening behavior.

This setting dictates which IP stack the server listens on.

0Listens on IPv4 only (default).
1Listens on IPv6 only.
2Listens on both IPv4 and IPv6.
XChildCount:   The number of child elements of the current JSON element.

This read-only configuration setting specifies the number of child elements of the current element in the most recently received SCIM JSON request. Child elements are indexed from 0 to (XChildCount - 1).

XChildName[i]:   The name of a child JSON element.

This read-only configuration setting provides the name of the i-th child element of the current element in the most recently received SCIM JSON request.

XChildXText[i]:   The text of a child JSON element.

This read-only configuration setting provides the inner text of the i-th child element of the current element in the most recently received SCIM JSON request.

XElement:   The name of the current JSON element.

This read-only configuration setting provides the name of the current element in the most recently received SCIM JSON request.

XParent:   The parent of the current JSON element.

This read-only configuration setting provides the parent of the current element in the most recently received SCIM JSON request.

XPath:   Selects an element in the most recently received SCIM JSON request.

This setting selects a JSON element in the most recently received SCIM request body. When set to a valid path, XElement, XText, XParent, XSubTree, XChildCount, XChildName[i], and XChildXText[i] provide information about that element.

JSON XPath values are rooted at /json. For example, /json/displayName selects the displayName property, and /json/members/[1]/value selects the first member's value property. XPath indices are 1-based.

Requests with an empty or invalid JSON body clear the current JSON XPath state.

XSubTree:   A snapshot of the current JSON element.

This read-only configuration setting provides the complete current element, including its child elements, from the most recently received SCIM JSON request.

XText:   The text of the current JSON element.

This read-only configuration setting provides the inner text of the current element in the most recently received SCIM JSON request.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

CodePage:   The system code page used for Unicode to Multibyte translations.

The default code page is Unicode UTF-8 (65001).

The following is a list of valid code page identifiers:

IdentifierName
037IBM EBCDIC - U.S./Canada
437OEM - United States
500IBM EBCDIC - International
708Arabic - ASMO 708
709Arabic - ASMO 449+, BCON V4
710Arabic - Transparent Arabic
720Arabic - Transparent ASMO
737OEM - Greek (formerly 437G)
775OEM - Baltic
850OEM - Multilingual Latin I
852OEM - Latin II
855OEM - Cyrillic (primarily Russian)
857OEM - Turkish
858OEM - Multilingual Latin I + Euro symbol
860OEM - Portuguese
861OEM - Icelandic
862OEM - Hebrew
863OEM - Canadian-French
864OEM - Arabic
865OEM - Nordic
866OEM - Russian
869OEM - Modern Greek
870IBM EBCDIC - Multilingual/ROECE (Latin-2)
874ANSI/OEM - Thai (same as 28605, ISO 8859-15)
875IBM EBCDIC - Modern Greek
932ANSI/OEM - Japanese, Shift-JIS
936ANSI/OEM - Simplified Chinese (PRC, Singapore)
949ANSI/OEM - Korean (Unified Hangul Code)
950ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)
1026IBM EBCDIC - Turkish (Latin-5)
1047IBM EBCDIC - Latin 1/Open System
1140IBM EBCDIC - U.S./Canada (037 + Euro symbol)
1141IBM EBCDIC - Germany (20273 + Euro symbol)
1142IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)
1143IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)
1144IBM EBCDIC - Italy (20280 + Euro symbol)
1145IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)
1146IBM EBCDIC - United Kingdom (20285 + Euro symbol)
1147IBM EBCDIC - France (20297 + Euro symbol)
1148IBM EBCDIC - International (500 + Euro symbol)
1149IBM EBCDIC - Icelandic (20871 + Euro symbol)
1200Unicode UCS-2 Little-Endian (BMP of ISO 10646)
1201Unicode UCS-2 Big-Endian
1250ANSI - Central European
1251ANSI - Cyrillic
1252ANSI - Latin I
1253ANSI - Greek
1254ANSI - Turkish
1255ANSI - Hebrew
1256ANSI - Arabic
1257ANSI - Baltic
1258ANSI/OEM - Vietnamese
1361Korean (Johab)
10000MAC - Roman
10001MAC - Japanese
10002MAC - Traditional Chinese (Big5)
10003MAC - Korean
10004MAC - Arabic
10005MAC - Hebrew
10006MAC - Greek I
10007MAC - Cyrillic
10008MAC - Simplified Chinese (GB 2312)
10010MAC - Romania
10017MAC - Ukraine
10021MAC - Thai
10029MAC - Latin II
10079MAC - Icelandic
10081MAC - Turkish
10082MAC - Croatia
12000Unicode UCS-4 Little-Endian
12001Unicode UCS-4 Big-Endian
20000CNS - Taiwan
20001TCA - Taiwan
20002Eten - Taiwan
20003IBM5550 - Taiwan
20004TeleText - Taiwan
20005Wang - Taiwan
20105IA5 IRV International Alphabet No. 5 (7-bit)
20106IA5 German (7-bit)
20107IA5 Swedish (7-bit)
20108IA5 Norwegian (7-bit)
20127US-ASCII (7-bit)
20261T.61
20269ISO 6937 Non-Spacing Accent
20273IBM EBCDIC - Germany
20277IBM EBCDIC - Denmark/Norway
20278IBM EBCDIC - Finland/Sweden
20280IBM EBCDIC - Italy
20284IBM EBCDIC - Latin America/Spain
20285IBM EBCDIC - United Kingdom
20290IBM EBCDIC - Japanese Katakana Extended
20297IBM EBCDIC - France
20420IBM EBCDIC - Arabic
20423IBM EBCDIC - Greek
20424IBM EBCDIC - Hebrew
20833IBM EBCDIC - Korean Extended
20838IBM EBCDIC - Thai
20866Russian - KOI8-R
20871IBM EBCDIC - Icelandic
20880IBM EBCDIC - Cyrillic (Russian)
20905IBM EBCDIC - Turkish
20924IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)
20932JIS X 0208-1990 & 0121-1990
20936Simplified Chinese (GB2312)
21025IBM EBCDIC - Cyrillic (Serbian, Bulgarian)
21027Extended Alpha Lowercase
21866Ukrainian (KOI8-U)
28591ISO 8859-1 Latin I
28592ISO 8859-2 Central Europe
28593ISO 8859-3 Latin 3
28594ISO 8859-4 Baltic
28595ISO 8859-5 Cyrillic
28596ISO 8859-6 Arabic
28597ISO 8859-7 Greek
28598ISO 8859-8 Hebrew
28599ISO 8859-9 Latin 5
28605ISO 8859-15 Latin 9
29001Europa 3
38598ISO 8859-8 Hebrew
50220ISO 2022 Japanese with no halfwidth Katakana
50221ISO 2022 Japanese with halfwidth Katakana
50222ISO 2022 Japanese JIS X 0201-1989
50225ISO 2022 Korean
50227ISO 2022 Simplified Chinese
50229ISO 2022 Traditional Chinese
50930Japanese (Katakana) Extended
50931US/Canada and Japanese
50933Korean Extended and Korean
50935Simplified Chinese Extended and Simplified Chinese
50936Simplified Chinese
50937US/Canada and Traditional Chinese
50939Japanese (Latin) Extended and Japanese
51932EUC - Japanese
51936EUC - Simplified Chinese
51949EUC - Korean
51950EUC - Traditional Chinese
52936HZ-GB2312 Simplified Chinese
54936Windows XP: GB18030 Simplified Chinese (4 Byte)
57002ISCII Devanagari
57003ISCII Bengali
57004ISCII Tamil
57005ISCII Telugu
57006ISCII Assamese
57007ISCII Oriya
57008ISCII Kannada
57009ISCII Malayalam
57010ISCII Gujarati
57011ISCII Punjabi
65000Unicode UTF-7
65001Unicode UTF-8
The following is a list of valid code page identifiers for Mac OS only:
IdentifierName
1ASCII
2NEXTSTEP
3JapaneseEUC
4UTF8
5ISOLatin1
6Symbol
7NonLossyASCII
8ShiftJIS
9ISOLatin2
10Unicode
11WindowsCP1251
12WindowsCP1252
13WindowsCP1253
14WindowsCP1254
15WindowsCP1250
21ISO2022JP
30MacOSRoman
10UTF16String
0x90000100UTF16BigEndian
0x94000100UTF16LittleEndian
0x8c000100UTF32String
0x98000100UTF32BigEndian
0x9c000100UTF32LittleEndian
65536Proprietary

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitiveData:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

ProcessIdleEvents:   Whether the class uses its internal event loop to process events when the main thread is idle.

If set to False, the class will not fire internal idle events. Set this to False to use the class in a background thread on Mac OS. By default, this setting is True.

SelectWaitMillis:   The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.

If there are no events to process when DoEvents is called, the class will wait for the amount of time specified here before returning. The default value is 20.

UseInternalSecurityAPI:   Whether or not to use the system security libraries or an internal implementation.

When set to false, the class will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this configuration setting to true tells the class to use the internal implementation instead of using the system security libraries.

On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.

To use the system security libraries for Linux, OpenSSL support must be enabled. For more information on how to enable OpenSSL, please refer to the OpenSSL Notes section.

Trappable Errors (SCIMDesktop Class)

Error Handling (C++)

Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

SCIMDesktop Errors

961    Authentication failed. The request was rejected because the AuthRequest event did not accept the credentials.
962    Invalid request. The request body could not be parsed as valid SCIM JSON, a required field is missing, a PATCH operation or path is not supported, or an If-Match precondition failed.
963    Unsupported operation. The requested HTTP method and resource type combination is not enabled in the SupportedOperations property.
964    Filter parse error. The SCIM filter expression supplied in a GET /Users or GET /Groups request could not be parsed.
965    Endpoint not found. The request URI does not match a SCIM endpoint under the BaseURL path, or it names a resource type or schema that does not exist.
966    Method not allowed. The HTTP method is not supported by the requested SCIM endpoint.

The class may also return one of the following error codes, which are inherited from other classes.