...
La classe ShibbolethApacheModuleAuthenticationService propose une authentification shib.
| Bloc de code |
|---|
<bean id="delegatingAuthenticationServiceauthenticationService" lazy-init="true" class="org.esupportail.commons.services.authentication.ShibbolethApacheModuleAuthenticationService"> <property name="idHeader" value=""/> <property name="attributeHeaders"> <list> <value></value> </list> </property> </bean> |
L'authentification shibboleth est faite par un module apache qui fonctionne en amont de l'application Java. Par l'option "ShibUseHeaders On" le module transmet à l'application Java, sous forme d'entêtes HTTP, l'ensemble des attributs de utilisateur connecté (reçus depuis le fournisseur d'identités). Ce sont ces attributs qui sont utilisés par l'implémentation ShibbolethApacheModuleAuthenticationService. L'objet AuthInfo renvoyé par la méthode getAuthInfo() de AuthenticationService implémente 3 méthodes :
- getId() : Renvoie l'identifiant de l'utilisateur. C'est en fait l'entête http ayant pour nom la valeur de la propriété idHeader de ShibbolethApacheModuleAuthenticationService
- getType() : Renvoie AuthUtils.SHIBBOLETH
- getAttributes() : Renvoie une Map d'attributs correspondant à aux noms des entêtes http ciblées par la valeur de la propriété attributeHeaders de ShibbolethApacheModuleAuthenticationService
Authentification par le Remote User
...