X4 Produktdokumentation

User Identity Adapter

The adapter allows you to retrieve information about the currently logged-in user, such as the user name, first and last name, set language, e-mail address, and groups to which this user belongs.

Properties

Operation

Operation executed by the adapter

Possible values:

  • GetUserIdentity: Returns the information about the user.

  • SetUserIdentity: Modifies the information about the current user based on a JSON Web Token (JWT).

Parameters

generateTestGroup

Specifies whether to generate a test group entry when the adapter is running in debug mode.

info Works only in debug mode.

Possible values:

  • true: Generate a sample group entry

  • false: Do not generate a sample group entry

testGroupName

Technical name of the test group entry if generateTestGroup is set to true.

Possible values:

Any string

testGroupDisplayName

Display name of the test group entry if generateTestGroup is set to true.

Possible values:

Any string

username

User name used when generateTestGroup is set to true.

Possible values:

Any string

lastname

Last name used when generateTestGroup is set to true.

Possible values:

Any string

firstname

First name used when generateTestGroup is set to true.

Possible values:

Any string

email

Email address used when generateTestGroup is set to true.

Possible values:

Any valid email address

timezone

User time zone according to ISO 8601, which is returned in debug mode.

Possible values:

Time zone according to ISO 8601 duration format, e.g. PT5H

jwtToken

This parameter is used with the SetUserIdentity operation.

JSON Web Token (JWT) for exchanging claims with information about the user

Possible values:

Any valid token

jwtUsername

This parameter is used with the SetUserIdentity operation.

Defines the field name for the user name in the JSON Web Token.

Possible values:

Any string

jwtGroups

This parameter is used with the SetUserIdentity operation.

Defines the field name for the groups in the JWT. Depending on the structure, comma-separated values are used and only first or second level elements are allowed.

Possible values:

Any string

jwtRoles

This parameter is used with the SetUserIdentity operation.

Defines the field name for the groups in the JWT. Depending on the structure, comma-separated values are used and only first or second level elements are allowed.

Possible values:

Any string

Status values

1

The adapter operation was successful.

-1

An error occurred while running the adapter.

Output XML

XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Result>
	<Username></Username>
	<Language></Language>
	<Groups>
		<Group>
			<Name></Name>
			<DisplayName></DisplayName>
		</Group>
		<Group>
			<Name></Name>
			<DisplayName></DisplayName>
		</Group>
	</Groups>
	<Timezone>
		<Offset></Offset>
	</Timezone>
    <AccessToken></AccessToken>
	<SessionId></SessionId>
	<Claims>
		<Claim key="" value=""/>
		<Claim key="" value=""/>
		<ComplexClaim key="" type="">
			<ComplexClaim key="" type="">
				<ComplexClaim key="" type="">
					<Entry value=""/>
					<Entry value=""/>
					<Entry value=""/>
				</ComplexClaim>
				<isParent></isParent>
			</ComplexClaim>
			<isParent></isParent>
		</ComplexClaim>
	</Claims>
</Result>

XSD

XML
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="Result" type="ResultType"/>
	<xs:complexType name="GroupType">
		<xs:sequence>
			<xs:element type="xs:string" name="Name"/>
			<xs:element type="xs:string" name="DisplayName"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="GroupsType">
		<xs:sequence>
			<xs:element type="GroupType" name="Group" maxOccurs="unbounded" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TimezoneType">
		<xs:sequence>
			<xs:element type="xs:duration" name="Offset"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ClaimType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute type="xs:string" name="key" use="optional"/>
				<xs:attribute type="xs:string" name="value" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="EntryType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute type="xs:string" name="value" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="ComplexClaimType">
		<xs:sequence>
			<xs:element type="EntryType" name="Entry" maxOccurs="unbounded" minOccurs="0"/>
			<xs:element type="ComplexClaimType" name="ComplexClaim" minOccurs="0"/>
			<xs:element type="ClaimType" name="Claim" maxOccurs="unbounded" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute type="xs:string" name="key" use="optional"/>
		<xs:attribute type="xs:string" name="type" use="optional"/>
	</xs:complexType>
	<xs:complexType name="ClaimsType">
		<xs:sequence>
			<xs:element type="ClaimType" name="Claim" maxOccurs="unbounded" minOccurs="0"/>
			<xs:element type="ComplexClaimType" name="ComplexClaim" maxOccurs="unbounded" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ResultType">
		<xs:sequence>
			<xs:element type="xs:string" name="Username"/>
			<xs:element type="xs:string" name="Language"/>
			<xs:element type="GroupsType" name="Groups"/>
			<xs:element type="TimezoneType" name="Timezone"/>
			<xs:element type="xs:string" name="AccessToken"/>
			<xs:element type="xs:string" name="SessionId"/>
			<xs:element type="ClaimsType" name="Claims"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>