Projets
Pages enfant
  • 3.14 Authentification

Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

Remarque
titleA compléter

Shib

Authentification par le Remote User

La classe RemoteUserAuthenticator s'appuie sur la variable REMOTE_USER de HTTP :

...

Esup-commons propose une implémentation delegatingAuthenticationService qui permet de chaîner les services d'authentificationplusieurs des services d'authentification cités précédemment.

Bloc de code

<bean id="authenticator" lazy-init="true"
		class="org.esupportail.example.services.authentication.AuthenticatorImpl">
		<property name="authenticationService" ref="delegatingAuthenticationService" />
	</bean>

        <bean id="delegatingAuthenticationService" lazy-init="true"
		class="org.esupportail.commons.services.authentication.DelegatingAuthenticationService">
            <property name="authenticationServices">
               <list>
                   <ref bean="portletAuthenticationService" />
                   <ref bean="casFilterAuthenticationService" />
                   <ref bean="offlineFixedUserAuthenticationService" />
               </list>
            </property>
        </bean>

	<bean id="casFilterAuthenticationService" lazy-init="true"
		class="org.esupportail.commons.services.authentication.CasFilterAuthenticationService">
	</bean>
	
	<bean id="portletAuthenticationService" lazy-init="true"
		class="org.esupportail.commons.services.authentication.CasifiedPortalAuthenticationService">
		<property name="uidPortalAttribute" value="uid" />
	</bean>
	
	<bean id="offlineFixedUserAuthenticationService"
		class="org.esupportail.commons.services.authentication.OfflineFixedUserAuthenticationService">
		<property name="authId" value="guest" />
		<property name="authType" value="cas" />
	</bean>

A la connexion de l'utilisateur esup-commons tentera le premier service d'authentification indiqué, si celui-ci échoue (ne retourne pas d'utilisateur) il passera au suivant et ainsi de suite dans l'ordre des services paramétrés jusqu'à ce qu'une authentification réussisse.

Dans esup-commons v1 on avait la classe PortalOrCasFilterAuthenticator s'appuie d'abord sur JSR-168, puis sur le filtre CAS qui fonctionnait à la fois en mode portlet ou servlet) :

...

Cette implémentation est désormais dépréciée au profit de la classe delegatedAuthenticationService delegatingAuthenticationService.

Utilisation du service d'authentification

...