Configuring authentication modules

Individual authentication modules and their properties and parameters are defined as JSON.

Values ​​can be logged within JSON, which can then be displayed in logs.
This can be done using e.g.
Holder.warn(); – logs to the general (system-wide) logs
debug.log(); – logs to the calculation/debug logs

Calculations and functions from the following APIs can be embedded within postAuthInstructions or identUser:

EvalMathAPI

Calculations that are commonly used in calculations using lib.vypocet...(); Some calculations will not work here, e.g. for working with processes.

IdentityApi

  • findByImmutableId(immutableId: string)
  • findByObjectGUID(objectGUID: string)
  • findByExternalId(externalId: string)
  • findUser(userName: string)
  • findOrCreateUser(userName: string, firstName?: string, lastName?: string)
  • assignManagers(org, login)
  • setUserParams(user: User, params: Record<string, any>)
  • store(user: User)
  • setOrganization(login, org)
  • createOrganizationStructure(orgName, parentOrgStr, managerUser, organizationType?, logo_url?, users?)
  • getOrganization(orgName, parentOrgStr?)

HolderApi

holder.getTextProperty("cx\\.y"),

holder.get("a")

AxiosApi

See AXIOS API

CurlApi

Classic curl usage:

 curl.start();
curl.setOpt('CUSTOMREQUEST', 'GET');
curl.perform();

DynamicTableApi

  • from(dt, columns?)
  • select(columns)
  • getCell(dt, index, col)
  • getId()
  • getSourceFiles(returnOnlyLastRecord)
  • whereNullCol(column)
  • whereNotNullCol(column)
  • whereCol(column, value, operator = "=")
  • orWhereCol(column, value, operator = "=")
  • whereIndex(index, operator = "=")
  • orderBy(column, direction = "asc", sortType = "text")
  • orWhereIndex(index, operator = "=")
  • get()
  • remove()
  • count()
  • getFirst()
  • getLast()
  • addEmptyRow(index)
  • addRow(index, data)
  • getCols()
  • update(column, value)

AzureAd configuration - example

{
"logoutParams": {
"url": "/authenticate"
},
"tenantID": "XXXX",
"clientID": "XXXX",
"responseType": "id_token token",
"responseMode": "form_post",
"scope": [
"profile",
"email",
"openid"
],
"includeUserProfilePicture": true,
"allowHttpForRedirectUrl": false,
"postAuthInstructions": [
"/* Retrieve values from the input */",
"const name = Holder.getTextProperty('name');",
"const email = Holder.getTextProperty('email');",
"const photo = Holder.getTextProperty('photo');",
"const userExternalId = Holder.getTextProperty('oid');",
"const userExternalSource = Holder.getTextProperty('source');",
"const displayName = Holder.getTextProperty('displayName');",
"",
"/* Assign values, split if necessary */",
"const username = email;",
"const [ firstName, ...lastNames ] = Holder.getTextProperty('name').split(' ');",
"",
"/* Find or create a User with the given information */",
"const user = identity.findOrCreateUser(username, firstName, lastNames.join(' '));",
"",
"/* Set user email and photo */",
"user.USER_EMAIL = email;",
"user.USER_PHOTO = photo;",
"user.USER_EXTERNAL_SOURCE = userExternalSource;",
"user.EXTERNAL_ID = userExternalId;",
"user.USER_DISPLAY_NAME = displayName;",
"return identity.store(user);"
]
}

Frantisek Brych Updated by Frantisek Brych

SMTP OAuth authentication

Active Directory Connector

Contact

Syca (opens in a new tab)

Powered by HelpDocs (opens in a new tab)