Kampf mit dem Proxy-Ticket

This commit is contained in:
Peter Hormanns 2010-09-22 16:39:16 +00:00
parent 64cb9b0a2a
commit e21fdda8b2
2 changed files with 22 additions and 20 deletions

View File

@ -20,6 +20,7 @@ public class Context {
public String getUser() { public String getUser() {
Assertion assertion = (Assertion) getContext().getSessionMap().get(AbstractCasFilter.CONST_CAS_ASSERTION); Assertion assertion = (Assertion) getContext().getSessionMap().get(AbstractCasFilter.CONST_CAS_ASSERTION);
AttributePrincipal principal = assertion.getPrincipal(); AttributePrincipal principal = assertion.getPrincipal();
String proxyTicket = principal.getProxyTicketFor("https://agnes.ostwall195.de/backend");
return principal.getName(); return principal.getName();
} }

View File

@ -4,20 +4,21 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"> version="2.5">
<context-param>
<param-name>serverName</param-name>
<param-value>http://agnes.ostwall195.de:8180</param-value>
</context-param>
<filter> <filter>
<filter-name>CAS Authentication Filter</filter-name> <filter-name>CAS Authentication Filter</filter-name>
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<init-param> <init-param>
<param-name>casServerLoginUrl</param-name> <param-name>casServerLoginUrl</param-name>
<param-value>http://agnes.ostwall195.de:8080/cas/login</param-value> <param-value>https://agnes.ostwall195.de:9443/cas/login</param-value>
</init-param>
<init-param>
<param-name>serverName</param-name>
<param-value>http://agnes.ostwall195.de:8080</param-value>
</init-param> </init-param>
<init-param> <init-param>
<param-name>service</param-name> <param-name>service</param-name>
<param-value>http://agnes.ostwall195.de:8080/hsarweb</param-value> <param-value>http://agnes.ostwall195.de:8180/hsarweb</param-value>
</init-param> </init-param>
</filter> </filter>
@ -26,29 +27,29 @@
<filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class> <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
<init-param> <init-param>
<param-name>casServerUrlPrefix</param-name> <param-name>casServerUrlPrefix</param-name>
<param-value>http://agnes.ostwall195.de:8080/cas</param-value> <param-value>https://agnes.ostwall195.de:9443/cas</param-value>
</init-param> </init-param>
<init-param> <init-param>
<param-name>serverName</param-name> <param-name>proxyReceptorUrl</param-name>
<param-value>http://agnes.ostwall195.de:8080</param-value> <param-value>/proxyCallback</param-value>
</init-param> </init-param>
<init-param> <init-param>
<param-name>proxyReceptorUrl</param-name> <param-name>proxyCallbackUrl</param-name>
<param-value>/proxyReceptor</param-value> <param-value>https://agnes.ostwall195.de:9443/hsarweb/proxyCallback</param-value>
</init-param> </init-param>
<init-param> <init-param>
<param-name>service</param-name> <param-name>service</param-name>
<param-value>http://agnes.ostwall195.de:8080/hsarweb</param-value> <param-value>http://agnes.ostwall195.de:8180/hsarweb</param-value>
</init-param> </init-param>
</filter> </filter>
<filter-mapping> <filter-mapping>
<filter-name>CAS Authentication Filter</filter-name> <filter-name>CAS Validation Filter</filter-name>
<url-pattern>/*</url-pattern> <url-pattern>/*</url-pattern>
</filter-mapping> </filter-mapping>
<filter-mapping> <filter-mapping>
<filter-name>CAS Validation Filter</filter-name> <filter-name>CAS Authentication Filter</filter-name>
<url-pattern>/*</url-pattern> <url-pattern>/*</url-pattern>
</filter-mapping> </filter-mapping>