public class JCRAuthorizationModule extends AbstractLoginModule
callbackHandler, 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, subject, success, TRY_FIRST_PASS, TRY_MAPPED_PASS, USE_FIRST_PASS, USE_MAPPED_PASS, useRealmCallback
Constructor and Description |
---|
JCRAuthorizationModule() |
Modifier and Type | Method and Description |
---|---|
protected void |
addGroups(String[] groups)
Sets the list of groups,
info.magnolia.jaas.principal.GroupList . |
protected void |
addRoles(String[] roles)
Sets the list of roles,
info.magnolia.jaas.principal.RoleList . |
boolean |
login() |
void |
setACL()
Sets access control list from the user, roles and groups.
|
protected void |
setACLForGroups(String[] groups,
PrincipalCollection principalList)
Looks for groups configured in magnolia repository with the given name, and configures ACLs for it.
|
protected void |
setACLForRoles(String[] roles,
PrincipalCollection principalList)
Looks for role configured in magnolia repository with the given name, and configures ACLs for it.
|
protected void |
setACLForUser(PrincipalCollection principalList,
User user,
SecuritySupport securitySupport) |
void |
setEntity()
Sets user details.
|
void |
validateUser()
Checks if the credentials exist in the repository.
|
abort, addGroupName, addRoleName, commit, getGroupNames, getRoleNames, getSharedStatus, getSkip, initialize, logout, release, setGroupNames, setRoleNames, setSharedStatus
public void validateUser() throws LoginException
AbstractLoginModule
validateUser
in class AbstractLoginModule
LoginException
- or specific subclasses to report failures.public boolean login() throws LoginException
login
in interface LoginModule
login
in class AbstractLoginModule
LoginException
public void setACL()
setACL
in class AbstractLoginModule
protected void setACLForUser(PrincipalCollection principalList, User user, SecuritySupport securitySupport)
public void setEntity()
AbstractLoginModule
setEntity
in class AbstractLoginModule
protected void addGroups(String[] groups)
info.magnolia.jaas.principal.GroupList
.groups
- array of group namesprotected void addRoles(String[] roles)
info.magnolia.jaas.principal.RoleList
.roles
- array of role namesprotected void setACLForRoles(String[] roles, PrincipalCollection principalList)
roles
- array of role names.principalList
- PrincipalCollectionprotected void setACLForGroups(String[] groups, PrincipalCollection principalList)
groups
- array of group names.principalList
- PrincipalCollectionCopyright © 2003–2016 Magnolia International Ltd.. All rights reserved.