Retrieve roles and scopes
Retrieve the OpenID Connect/OAuth2 Single sign-on roles and scopes in your Genero application.
-
OIDC_SCOPES
(OIDC stands for OpenID Connect) contains the list of scopes provided by the identity provider. -
OIDC_ROLES
contains the list of roles provided by the identity provider.
A role is the mechanism in OAuth 2.0 that determines who can access the application, and scopes can determine the level of access to a resource based on the functionality or security needed. For example, a scope may allow the application to read but not write data on behalf of the user.
Roles and scopes are available after the user has been successfully authenticated, and can be retrieved in the application.
- Open the configuration file $FGLDIR/web_utilities/services/openid-connect/res/configuration.
- Locate the entry
oidc.accesstoken.decode
and set the value to "true" (default is false).
On the application side, the list of roles and scopes can be retrieved using the
fgl_getenv()
instruction: