info.magnolia.jaas.sp.jcr
Class MagnoliaAuthenticationModule

java.lang.Object
  extended by info.magnolia.jaas.sp.AbstractLoginModule
      extended by info.magnolia.jaas.sp.jcr.MagnoliaAuthenticationModule
All Implemented Interfaces:
UserAwareLoginModule, Serializable, LoginModule

public class MagnoliaAuthenticationModule
extends AbstractLoginModule
implements UserAwareLoginModule, Serializable

Authentication module implementation using JCR to retrieve the users.

Version:
$Id: MagnoliaAuthenticationModule.java 45632 2011-05-28 12:46:32Z had $
See Also:
Serialized Form

Nested Class Summary
 class MagnoliaAuthenticationModule.MagnoliaJRAdminPrincipal
          As silly as it seems this class sole purpose of existence is to implement Serializable required by JR itself.
 
Field Summary
protected  User user
           
 
Fields inherited from class info.magnolia.jaas.sp.AbstractLoginModule
callbackHandler, log, 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 Summary
MagnoliaAuthenticationModule()
           
 
Method Summary
 void collectGroupNames()
          Extract all the configured groups from the given node.
 void collectRoleNames()
          Extract all the configured roles from the given node.
 User getUser()
           
protected  void initUser()
           
protected  void matchPassword()
           
 void setACL()
          Set access control list from the user, roles and groups.
 void setEntity()
          Set user details.
 void validateUser()
          Checks is the credentials exist in the repository.
 
Methods inherited from class info.magnolia.jaas.sp.AbstractLoginModule
abort, addGroupName, addRoleName, commit, getGroupNames, getRoleNames, getSharedStatus, getSkip, initialize, login, logout, release, setGroupNames, setRoleNames, setSharedStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

user

protected User user
Constructor Detail

MagnoliaAuthenticationModule

public MagnoliaAuthenticationModule()
Method Detail

validateUser

public void validateUser()
                  throws LoginException
Checks is the credentials exist in the repository.

Specified by:
validateUser in class AbstractLoginModule
Throws:
LoginException - or specific subclasses (which will be handled further for user feedback)

initUser

protected void initUser()
                 throws LoginException
Throws:
LoginException

matchPassword

protected void matchPassword()
                      throws LoginException
Throws:
LoginException

setEntity

public void setEntity()
Set user details.

Specified by:
setEntity in class AbstractLoginModule

setACL

public void setACL()
Set access control list from the user, roles and groups.

Specified by:
setACL in class AbstractLoginModule

collectRoleNames

public void collectRoleNames()
Extract all the configured roles from the given node. (which can be the user node or a group node)


collectGroupNames

public void collectGroupNames()
Extract all the configured groups from the given node. (which can be the user node or a group node)


getUser

public User getUser()
Specified by:
getUser in interface UserAwareLoginModule


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.