The following code shows how to use the API service to create, read, update, and delete single authentication systems using the IAuthenticationSystem interface:

define variable authSys as IAuthenticationSystem no-undo.

authSys = service:NewAuthenticationSystem("MyAuthSystem").
/* Set properties */
. . .
service:CreateAuthenticationSystem(authSys).

. . .
authSys = service:GetAuthenticationSystemAuthenticationSystem
  ("MyAuthSystem").
/* Set properties */
. . .
service:UpdateAuthenticationSystem(authSys).

. . .
service:DeleteAuthenticationSystem("MyAuthSystem ").

For more information on authentication systems, see Introduction to Identity Management.

It is also possible to retrieve a collection of authentication systems in the database from the service and then do create, read, update and/or delete on authentication systems in the IAuthenticationSystemSet collection before passing the collection to the service to be committed in a single transaction:

define variable typeSet as IAuthenticationSystemSet no-undo.
define variable authSys as IAuthenticationSystem no-undo.

typeSet = service:GetAuthenticationSystems().

authSys = service:NewAuthenticationSystem("SomeSystem").
/* Set properties and optionally add elements to collections */
. . .
typeSet:Add(authSys).

. . .
authSys = typeSet:Find("XSystem")
authSys:Description = ("XSystem is for special use").

authSys = typeSet:Find("ZSystem")
typeSet:Remove(authSys).

service:UpdateAuthenticationSystems(typeSet).

For more information on the: