ensure state can be shared
This commit is contained in:
unknown 2012-04-22 23:29:38 -04:00
parent 81e81256e0
commit 7302ca6a99
3 changed files with 2 additions and 3 deletions

View File

@ -209,6 +209,7 @@ public class CasLoginModule implements LoginModule {
this.assertion = null;
this.callbackHandler = handler;
this.subject = subject;
this.sharedState = (Map<String,Object>) state;
this.sharedState = new HashMap<String, Object>(state);
String ticketValidatorClass = null;
@ -412,7 +413,7 @@ public class CasLoginModule implements LoginModule {
this.subject.getPrincipals().add(roleGroup);
// Place principal name in shared state for downstream JAAS modules (module chaining use case)
this.sharedState.put(LOGIN_NAME, new Object()); // casPrincipal.getName());
this.sharedState.put(LOGIN_NAME, assertion.getPrincipal().getName());
if (log.isDebugEnabled()) {
if (log.isDebugEnabled()) {

View File

@ -2,7 +2,6 @@ package org.jasig.cas.client.proxy;
import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import javax.crypto.spec.DESedeKeySpec;
import java.security.InvalidKeyException;
import java.security.Key;

View File

@ -26,7 +26,6 @@ import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* Abstract filter that contains code that is common to all CAS filters.