org.apache.jetspeed.services.security.ldap
Class LDAPAuthentication
java.lang.Object
org.apache.turbine.services.BaseInitable
org.apache.turbine.services.BaseService
org.apache.turbine.services.TurbineBaseService
org.apache.jetspeed.services.security.ldap.LDAPAuthentication
- All Implemented Interfaces:
- org.apache.turbine.services.Initable, PortalAuthentication, org.apache.turbine.services.Service
- public class LDAPAuthentication
- extends org.apache.turbine.services.TurbineBaseService
- implements PortalAuthentication
- Version:
- $Id: LDAPAuthentication.java,v 1.8 2004/02/23 03:52:33 jford Exp $
- Author:
- Ender KILICOGLU, Sami Leino
| Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, properties, serviceBroker |
| Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
| Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, init, init, shutdown |
| Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
| Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
| Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, init, setInitableBroker, shutdown |
LDAPAuthentication
public LDAPAuthentication()
login
public JetspeedUser login(java.lang.String username,
java.lang.String password)
throws LoginException
- Given a public credential(username) and private credential(password),
perform authentication. If authentication succeeds, a
JetspeedUser
is returned representing the authenticated subject.
- Specified by:
login in interface PortalAuthentication
- Parameters:
username - a public credential of the subject to be authenticated.password - a private credentialof the subject to be authenticated.
- Returns:
- a
JetspeedUser object representing the authenticated subject.
- Throws:
LoginException - when general security provider failure.
FailedLoginException - when the authentication failed.
AccountExpiredException - when the subject's account is expired.
CredentialExpiredException - when the subject's credential is expired.
getAnonymousUser
public JetspeedUser getAnonymousUser()
throws LoginException
- Automatically authenticates and retrieves the portal anonymous user.
- Specified by:
getAnonymousUser in interface PortalAuthentication
- Returns:
- a
JetspeedUser object representing the authenticated subject.
- Throws:
LoginException - if the authentication fails.
logout
public void logout()
throws LoginException
- Logout the
JetspeedUser.
The logout procedure my may include removing/destroying
Principal and Credential information
if relevant to the security provider.
- Specified by:
logout in interface PortalAuthentication
- Throws:
LoginException - if the logout fails.
init
public void init(javax.servlet.ServletConfig conf)
throws org.apache.turbine.services.InitializationException
- This is the early initialization method called by the
Turbine
Service framework
- Parameters:
conf - The ServletConfig
- Throws:
throws - a InitializationException if the service
fails to initialize
org.apache.turbine.services.InitializationException
getRunData
protected JetspeedRunData getRunData()
getUserFromContext
protected JetspeedUser getUserFromContext()
putUserIntoContext
protected JetspeedRunData putUserIntoContext(JetspeedUser user)
Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.