serverName can contain several values, space separated.
Cf code !
https://github.com/apereo/java-cas-client/blob/master/cas-client-core/src/main/java/org/jasig/cas/client/util/CommonUtils.java#L230

snaffy <art.z...@gmail.com> a écrit :

I do not really understand how it could help me.
Both domains through apache2 proxy configuration point to the same
application - WebApp (specifically, they refer to the appropriate glassfish
virtual servers and the application uses them). The problem is that
serverName is a parameter related to the application (cas client) and I can
not set it dynamically depending on what domain the user is using.

If the cas client (WebApp) configuration looks like:
<bean id="casAuthenticationFilter"
class="org.jasig.cas.client.authentication.AuthenticationFilter">
        <property name="casServerLoginUrl"
value="${cas.server.host}/login"/>
        <property name="serverName" value="https://test1.domain.com"/>
</bean>

then, going to the application using the test1.domain.com domain, the
service parameter will look like this:
https://sso.server.com/cas/login?service=https%3A%2F%2Ftest1.domain.com%2FUtilimarcWebUI%2F
Going to the application using the test2.domain.com domain, the service
parameter will look like the following:
https://sso.server.com/cas/login?service=https%3A%2F%2Ftest1.domain.com%2FUtilimarcWebUI%2F
- the same template will always be loaded.

I can also directly specify the address of the service parameter

<bean id="casAuthenticationFilter"
class="org.jasig.cas.client.authentication.AuthenticationFilter">
<property name="casServerLoginUrl" value="${cas.server.ip}/cas/login" />
<property name="serverName" value="test1.domain.co" />
<property name="service" value="https://test2.domain.com/casclient"; />
</bean>
-- >
https://sso.server.com/cas/login?service=https%3A%2F%2Ftest2.domain.com%casclient%2F

So my problem comes down to questions how to determine the service
parameter in a dynamic way? Depending on the domain that the user went
through?

--
Pascal Rigaux

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/20171209103618.Horde.WRjxKI-syPXPZUE1iBWo94J%40courrier.univ-paris1.fr.

Reply via email to