|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jenkinsci.plugins.cas.spring.CasEventListener
public class CasEventListener
Listener for successful CAS authentication events, that maps Spring Security Authentication to Acegi Security and syncs attributes with the corresponding Jenkins User.
| Field Summary | |
|---|---|
static String |
DEFAULT_EMAIL_ATTRIBUTE
|
static String |
DEFAULT_FULL_NAME_ATTRIBUTE
|
| Constructor Summary | |
|---|---|
CasEventListener()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_FULL_NAME_ATTRIBUTE
public static final String DEFAULT_EMAIL_ATTRIBUTE
| Constructor Detail |
|---|
public CasEventListener()
| Method Detail |
|---|
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 token
protected void syncUserAttributes(org.springframework.security.cas.authentication.CasAuthenticationToken casToken)
throws IOException
casToken - CAS authentication token
IOException
protected String getAttributeValue(org.springframework.security.cas.authentication.CasAuthenticationToken authToken,
String attributeName)
authToken - CAS authentication tokenattributeName - attribute name
public 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||