|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.magnolia.jaas.sp.AbstractLoginModule
net.sourceforge.openutils.mgnlcas.CASAuthenticationModule
public class CASAuthenticationModule
This class implements a JAAS LoginModule that defers authentication to CAS. See the JAAS documentation for details
about configuration and architecture.
The calling application's CallbackHandler MUST return the ticket for a
TextInputCallback whose prompt is "ticket".
The CAS service MAY be hard-coded into the configuration; if it is not, the calling application's
CallbackHandler MAY return the service in a TextInputCallback whose prompt
is "service".
The cas_validate_url MUST be hard-coded in the configuration
Sample jaas.config configuration:
magnolia {
net.sourceforge.openutils.mgnlcas.CASAuthenticationModule
requisite
realm=cas;
info.magnolia.jaas.sp.jcr.JCRAuthenticationModule
requisite
skip_on_previous_success=true;
info.magnolia.jaas.sp.jcr.JCRAuthorizationModule required;
};
| Field Summary | |
|---|---|
protected javax.security.auth.callback.CallbackHandler |
callbackHandler
|
protected java.lang.String |
casValidateUrl
|
protected org.slf4j.Logger |
log
|
protected org.jasig.cas.client.authentication.AttributePrincipal |
principal
|
protected java.lang.String |
service
|
protected javax.security.auth.Subject |
subject
|
protected info.magnolia.cms.security.User |
user
|
| Fields inherited from class info.magnolia.jaas.sp.AbstractLoginModule |
|---|
name, OPTION_REALM, OPTION_SKIP_ON_PREVIOUS_SUCCESS, OPTION_USE_REALM_CALLBACK, options, pswd, realm, sharedState, STATUS, STATUS_FAILED, STATUS_SKIPPED, STATUS_SUCCEDED, STATUS_SUCCEEDED, STATUS_UNAVAILABLE, success, TRY_FIRST_PASS, TRY_MAPPED_PASS, USE_FIRST_PASS, USE_MAPPED_PASS, useRealmCallback |
| Constructor Summary | |
|---|---|
CASAuthenticationModule()
|
|
| Method Summary | |
|---|---|
protected void |
addGroups(java.lang.String[] groups)
Set the list of groups, info.magnolia.jaas.principal.GroupList. |
protected void |
addRoles(java.lang.String[] roles)
Set the list of roles, info.magnolia.jaas.principal.RoleList. |
boolean |
commit()
|
info.magnolia.cms.security.User |
getUser()
|
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
|
boolean |
login()
|
boolean |
release()
|
void |
setACL()
|
void |
setEntity()
|
void |
validateUser()
|
| Methods inherited from class info.magnolia.jaas.sp.AbstractLoginModule |
|---|
abort, addGroupName, addRoleName, getGroupNames, getRoleNames, getSharedStatus, getSkip, logout, setGroupNames, setRoleNames, setSharedStatus |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.security.auth.spi.LoginModule |
|---|
abort, logout |
| Field Detail |
|---|
protected javax.security.auth.Subject subject
protected javax.security.auth.callback.CallbackHandler callbackHandler
protected java.lang.String casValidateUrl
protected java.lang.String service
protected org.jasig.cas.client.authentication.AttributePrincipal principal
protected info.magnolia.cms.security.User user
protected org.slf4j.Logger log
| Constructor Detail |
|---|
public CASAuthenticationModule()
| Method Detail |
|---|
public void initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
initialize in interface javax.security.auth.spi.LoginModuleinitialize in class info.magnolia.jaas.sp.AbstractLoginModulesubject - callbackHandler - sharedState - options - can contain
public boolean login()
throws javax.security.auth.login.LoginException
login in interface javax.security.auth.spi.LoginModulelogin in class info.magnolia.jaas.sp.AbstractLoginModulejavax.security.auth.login.LoginException
public void validateUser()
throws javax.security.auth.login.LoginException
validateUser in class info.magnolia.jaas.sp.AbstractLoginModulejavax.security.auth.login.LoginException
public boolean commit()
throws javax.security.auth.login.LoginException
commit in interface javax.security.auth.spi.LoginModulecommit in class info.magnolia.jaas.sp.AbstractLoginModulejavax.security.auth.login.LoginExceptionpublic info.magnolia.cms.security.User getUser()
getUser in interface info.magnolia.jaas.sp.UserAwareLoginModulepublic boolean release()
release in class info.magnolia.jaas.sp.AbstractLoginModulepublic void setACL()
setACL in class info.magnolia.jaas.sp.AbstractLoginModulepublic void setEntity()
setEntity in class info.magnolia.jaas.sp.AbstractLoginModuleprotected void addGroups(java.lang.String[] groups)
groups - array of group namesprotected void addRoles(java.lang.String[] roles)
roles - array of role names
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||