...
Dans un navigateur lancer localhost :8080... on se trouve redirigé vers l'authentification cas de Rennes mais ça fonctionne :obtient ceci :
On constate que l'on est authentifié en bourges.
On va juste maintenant changer la page méthode d'authentification afin de pouvoir se connecter .
| Remarque | ||
|---|---|---|
| ||
>> MAJ numéros des lignes à modifier |
en CAS.
Pour cela, ouvrir /src/main/resources/properties/auth/auth.xml en paramêtrer un CasFilterAuthenticationService à la place du OfflineFixedUserAuthenticationService
| Bloc de code |
|---|
<bean id="authenticator" lazy-init="true"
class="org.esupportail.example.services.authentication.AuthenticatorImpl">
<property name="authenticationService" ref="servletAuthenticationService" />
</bean>
<bean id="servletAuthenticationService" lazy-init="true"
class="org.esupportail.commons.services.authentication.CasFilterAuthenticationService">
</bean>
|
Modifier ensuite Pour cela, modifier fichier /src/main/webapp/WEB-INF/web.xml ligne 150 ...et y indiquer l'adresse du votre serveur CAS
Exemple :
| Bloc de code |
|---|
<!-- CAS --> <filter> <filter-name>CAS Authentication Filter</filter-name> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> <init-param> <param-name>casServerLoginUrl</param-name> <param-value>https://cas.uhp-nancy.fr/cas/login</param-value> </init-param> <init-param> <param-name>serverName</param-name> <param-value>http://localhost:8080</param-value> </init-param> </filter> |
... et 169
| Bloc de code |
|---|
<filter> <filter-name>CAS Validation Filter</filter-name> <!-- <filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter</filter-class> --> <filter-class>org.jasig.cas.client.validation.Cas10TicketValidationFilter</filter-class> <init-param> <param-name>casServerUrlPrefix</param-name> <param-value>https://cas.uhp-nancy.fr/cas</param-value> </init-param> <init-param> <param-name>serverName</param-name> <param-value>http://localhost:8080</param-value> </init-param> </filter> |
...
Retenter un localhost:8080
Et et vérifier que l'authentification fonctionne