public class CasEventListener extends Object implements org.springframework.context.ApplicationListener
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_EMAIL_ATTRIBUTE |
static String |
DEFAULT_FULL_NAME_ATTRIBUTE |
| Constructor and Description |
|---|
CasEventListener() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyToAcegiContext(org.springframework.security.cas.authentication.CasAuthenticationToken casToken)
Map a Spring Security CAS authentication token into the Acegi SecurityContext.
|
protected String |
getAttributeValue(org.springframework.security.cas.authentication.CasAuthenticationToken authToken,
String attributeName)
Retrieve an attribute's value from a CAS authentication token.
|
String |
getEmailAttribute()
Get the email address attribute name.
|
String |
getFullNameAttribute()
Get the full name attribute name.
|
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event)
Handle an application event.
|
protected void |
onSuccessfulAuthentication(org.springframework.security.core.Authentication authentication)
Successful authentication event handler.
|
void |
setEmailAttribute(String emailAttribute)
Set the email address attribute name.
|
void |
setFullNameAttribute(String fullNameAttribute)
Set the full name attribute name.
|
protected void |
syncUserAttributes(org.springframework.security.cas.authentication.CasAuthenticationToken casToken)
Sync user attributes with a CAS authentication token.
|
public static final String DEFAULT_FULL_NAME_ATTRIBUTE
public static final String DEFAULT_EMAIL_ATTRIBUTE
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListenerevent - the event to respond toprotected void onSuccessfulAuthentication(org.springframework.security.core.Authentication authentication)
authentication - the successful authentication objectprotected void copyToAcegiContext(org.springframework.security.cas.authentication.CasAuthenticationToken casToken)
casToken - CAS authentication tokenprotected void syncUserAttributes(org.springframework.security.cas.authentication.CasAuthenticationToken casToken)
throws IOException
casToken - CAS authentication tokenIOExceptionprotected String getAttributeValue(org.springframework.security.cas.authentication.CasAuthenticationToken authToken, String attributeName)
authToken - CAS authentication tokenattributeName - attribute namepublic String getFullNameAttribute()
public void setFullNameAttribute(String fullNameAttribute)
fullNameAttribute - full name attribute name.public String getEmailAttribute()
public void setEmailAttribute(String emailAttribute)
emailAttribute - email address attribute name.Copyright © 2004-2012. All Rights Reserved.