Skip to main content
Version: 4.32.x.x LTS

UserinfoClientState

Introduction and overview

Given an access token and the provider configuration, the AuthState UserinfoClientState requests claims from a Userinfo Endpoint by sending a Userinfo Request.

Description

The following table describes the characteristics of the AuthState.

TopicDescription
Classch.nevis.esauth.auth.states.oauth2.openid.rp.UserinfoClientState
LoggingOIDCRelyingParty
Auditingnone
Markernone
PropertiesproviderConfiguration (string)A string that contains eitherprovider metadata as specified in the RFC, or a variable containing a provider metadata document. This AuthState uses the HTTP or FTP protocol to fetch the metadata document (depends on the URL configured). It is thus susceptible to HTTP and FTP proxies, as described in chapter Configuring proxies.
accessToken (string)Value or variable containing the access token to use in the Userinfo Request being sent to the Userinfo Endpoint.
Methodsprocess: Issues a userinfo request to the userinfo endpoint configured via the provider configuration.
Inputnone
Transitionsfailed: Error when sending the Userinfo Request or Userinfo Error Response received
ok: Userinfo Success Response received and parsing was successful
Outputsession:[AuthStateName].userinfoResponse The value of fields of the received user info response.
Errorsnone
Notesnone

AuthState Config Example

<AuthState name="UserinfoClient" class="ch.nevis.esauth.auth.states.oauth2.openid.rp.UserinfoClientState"
authLevel="auth.test" final="false">
<ResultCond name="ok" next="AuthDone"/>
<ResultCond name="failed" next="AuthError"/>
<property name="providerConfiguration" value="${session:OIDCProviderMetadataFetcherState.providerMetadata}" />
<property name="accessToken" value="${session:RelyingParty.tokenResponse.access_token}" />
</AuthState>