org.jasig.portal.security.provider
Class SimpleLdapSecurityContext
java.lang.Object
org.jasig.portal.security.provider.ChainingSecurityContext
org.jasig.portal.security.provider.SimpleLdapSecurityContext
- All Implemented Interfaces:
- Serializable, IConfigurableSecurityContext, ISecurityContext
- Direct Known Subclasses:
- CacheLdapSecurityContext
public class SimpleLdapSecurityContext
- extends ChainingSecurityContext
- implements IConfigurableSecurityContext
This is an implementation of a SecurityContext that checks a user's
credentials against an LDAP directory. It expects to be able to bind
to the LDAP directory as the user so that it can authenticate the
user.
By implementing the IConfigurableSecurityContext
interface this context may have properties set on it. The one property
the SimpleLdapSecurityContext looks for is defined by
the String LDAP_PROPERTIES_CONNECTION_NAME "connection".
This property allows a specific, named, LDAP connection to be used by
the context. If no "connection" property is specified the default
LDAP connection returned by LdapServices is
used.
- Version:
- $Revision: 19776 $
- Author:
- Russell Tokuyama (University of Hawaii)
- See Also:
- Serialized Form
| Methods inherited from class org.jasig.portal.security.provider.ChainingSecurityContext |
addSubContext, doesSubContextExist, getAdditionalDescriptor, getOpaqueCredentials, getOpaqueCredentialsInstance, getPrincipal, getPrincipalInstance, getSubContext, getSubContextNames, getSubContexts, isAuthenticated |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTR_UID
public static final int ATTR_UID
- See Also:
- Constant Field Values
ATTR_FIRSTNAME
public static final int ATTR_FIRSTNAME
- See Also:
- Constant Field Values
ATTR_LASTNAME
public static final int ATTR_LASTNAME
- See Also:
- Constant Field Values
LDAP_PROPERTIES_CONNECTION_NAME
public static final String LDAP_PROPERTIES_CONNECTION_NAME
- See Also:
- Constant Field Values
setProperties
public void setProperties(Properties props)
- Sets the properties to use for this security context.
- Specified by:
setProperties in interface IConfigurableSecurityContext
- Parameters:
props - The properties to set on the SecurityContext.- See Also:
IConfigurableSecurityContext.setProperties(java.util.Properties)
getAuthType
public int getAuthType()
- Returns the type of authentication this class provides.
- Specified by:
getAuthType in interface ISecurityContext
- Returns:
- authorization type
authenticate
public void authenticate()
throws PortalSecurityException
- Authenticates the user.
- Specified by:
authenticate in interface ISecurityContext- Overrides:
authenticate in class ChainingSecurityContext
- Throws:
PortalSecurityException- See Also:
ISecurityContext.getPrincipalInstance(),
ISecurityContext.getOpaqueCredentialsInstance()
Copyright © 2010 Jasig. All Rights Reserved.