Skip to content

Client oauth2

Description

Ce client permet l'authentification par OAuth2.

Paramètres

clientId obligatoire
Nom du client id défini au niveau du serveur
clientSecret obligatoire

Secret rattaché au client id.

Nous rappelons ici que la valeur peut être chiffrée. On l'indiquera alors en ajoutant un attribut encrypted="true" à l'élément dans le fichier XML.

authUrl obligatoire
URL d'autorisation du serveur OAuth
tokenUrl obligatoire
URL de token du serveur OAuth
profileUrl obligatoire
URL de profil du serveur OAuth
profileId obligatoire
Id du profil OAuth
withState

Valeur true/false indiquant si un paramètre OAuth state est utilisé.

Par défaut la valeur est true.

scope
Scope. Il est possible de spécifier plusieurs scopes en les séparant par un espace, par exemple: openid profile roles.

Exemple

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<client name="oauth" type="oauth2">
    <clientId>ewt-client</clientId>
    <clientSecret>dATZeUMQAQnSPM88bwMt3Ugdfxg75IDS</clientSecret>
    <withState>true</withState>
    <scope>ewt-client-dedicated openid profile roles</scope>

    <authUrl>http://localhost:8081/auth/realms/example/protocol/openid-connect/auth</authUrl>
    <tokenUrl>http://localhost:8081/auth/realms/example/protocol/openid-connect/token</tokenUrl>
    <profileUrl>http://localhost:8081/auth/realms/example/protocol/openid-connect/userinfo</profileUrl>
    <profileId>preferred_username</profileId>
</client>