Skip to main content

Integration with applications over OpenID Connect and OAuth 2.0

To integrate Identity Provider with applications over the OpenID Connect and OAuth 2.0 protocols, use the following parameters of the am/idp/app-settings.json configuration file.

To get the server metadata, follow the link: https://<server_dns>/am/idp/.well-known/openid-configuration.

ParameterDescription
CustomAttributesThe block specifies the ServiceProvider and Attributes attributes (with the Name and UserNameFormat parameters).
ServiceProviderThe parameter value corresponds to ClientId from the OIDC section.
NameDefines the key the transmitted attribute is displayed with as a result of decrypting the IdToken value or a request to Userinfo. If the Name parameter does not match one of the possible values (email, name, family_name, given_name, middle_name), the transmitted attribute is not displayed in the response to the Userinfo request, but it is displayed in the IdToken decryption.
UserNameFormatDefines the user information transmitted to the OIDC client. This parameter accepts a strictly defined list of values: Id, ObjectGUID, Name, CanonicalName, PrincipalName, SamCompatibleName, DistinguishedName, Sid, FirstName, MiddleName, LastName, Email, Phone.
CertificateThumbprintThe thumbprint of the Identity Provider certificate. The certificate is loaded into the store of the computer where Identity Provider is installed.
ClientsThe block specifies the settings for each client application. There can be several client applications.
ClientIdA unique identifier used to define the client application when exchanging tokens, as well as for user authentication and authorization. When a client application requests access to protected resources, it provides its ClientId along with other credentials to obtain an access token. Default value: example-client.
ClientSecretA string of characters known only to the client application and the IDP server. ClientSecret is used in the token exchange process to confirm the identity of the client application. When requesting an access token, the client must provide its ClientId and ClientSecret for authentication. Default value: secret_secret_secret.
DisplayNameThe name of the client application. Used to display information in the client interface. Default value: Example client application.
PermissionsThe block specifies the attributes allowed for the application. After successful authentication and granting of permissions, the application can use the obtained data. The data specified in Permissions can be transmitted in the response over the OIDC protocol (ept — Endpoints, gt — GrantTypes, rst — ResponseTypes, scp — Scopes).
ept:authorizationInitiating authorization.
ept:logoutTerminating the session associated with the token by identifier.
ept:tokenUsed to obtain a token.
gt:authorization_codeUsed to obtain tokens (ID Token and Access Token) with an intermediate authorization code.
gt:refresh_tokenUsed to obtain a new access token without re-authenticating the user.
rst:codeUsed to obtain an authorization code.
scp:emailThe user email address.
scp:profileThe user profile information includes the following components: name, given_name, family_name, middle_name.
scp:openidIndicates that the client application requests user authentication.
scp:offline_accessAllows the client application to request a refresh token.
PostLogoutRedirectUrisContains the valid URLs the user is redirected to after logging out of the client application.
RedirectUrisContains the valid URLs the user is redirected to after a successful login to the client application.
RequirementsDefines additional requirements for client requests that must be met for successful user authentication and authorization.

The following table lists the attributes that Identity Provider transmits to the client application after successful user authentication.

ParameterDescription
expDefines the time after which the ID Token is not accepted.
iatThe time the JWT was issued.
subA unique subject identifier. The user identifier is specified as the value.
iisThe organization that issued the token. A URL is specified.
audThe token recipient; the client_id of the application that sent the authentication request is specified.

For more information about configuring integration with applications over the OpenID Connect and OAuth 2.0 protocols, see the knowledge base articles Configuring OIDC using Keycloak as an example and Configuring NextCloud + OIDC.