Sm_PolicyApi_AddSAMLScheme()

Adds a new SAML 2.0 authentication scheme object or modifies an existing one. This function also defines metadata properties for the associated Identity Provider. The metadata properties are stored with the authentication scheme.
casso10
Adds a new SAML 2.0 authentication scheme object or modifies an existing one. This function also defines metadata properties for the associated Identity Provider. The metadata properties are stored with the authentication scheme.
Type
SAML 2.0 Configuration function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddSAMLScheme
(
void*pHandle,
Sm_PolicyApi_Scheme_t*pstructScheme,
Sm_PolicyApi_SAMLProviderProp_t*pProps,
const boolbUpdate,
char**pszErrMsg
);
Parameter
I/O
Description
pHandle
I
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session.
pstructScheme
I
A pointer to a completed scheme structure.
pProps
I
SAML 2.0 metadata properties associated with the authentication scheme.
If you do not assign a value to a property associated with a default value, the default will be assigned.
bUpdate
I
Specifies whether an update operation should be performed on an existing object.
pszErrMsg
O
String containing an error message if the authentication scheme is not added or updated successfully.
The Policy Management API allocates memory for this parameter dynamically. It is the responsibility of the custom application to free it using a call to Sm_PolicyApi_FreeString()..
If Sm_PolicyApi_MissingProperty or Sm_PolicyApi_InvalidProp are returned, this field contains the name of the property that is missing or invalid.
Returns
  • Sm_PolicyApi_Success. The SAML 2.0 authentication scheme operation was successful.
  • Sm_PolicyApi_Failure. The SAML 2.0 authentication operation was not successful
  • Sm_PolicyApi_InvalidProp. A specified property is invalid. The property name is returned in
    pszErrMsg
    .
  • Sm_PolicyApi_MissingProperty. A required property was not specified. The property name is returned in
    pszErrMsg
    .
  • Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
  • Sm_PolicyApi_NoSession. There is no valid administrator session.
  • Sm_PolicyApi_NoPrivilege. The administrator does not have the privilege to create a SAML 2.0 authentication scheme.
  • Sm_PolicyApi_SAMLIDP_IncorrectParameters. The supplied SAML provider properties are incomplete or incorrect.
  • Sm_PolicyApi_SAMLIDP_ProviderIdNotUnique. The supplied SAML provider ID is not unique.