org.apache.jetspeed.services.security.nosecurity
Class NoAuthentication

java.lang.Object
  extended byorg.apache.turbine.services.BaseInitable
      extended byorg.apache.turbine.services.BaseService
          extended byorg.apache.turbine.services.TurbineBaseService
              extended byorg.apache.jetspeed.services.security.nosecurity.NoAuthentication
All Implemented Interfaces:
org.apache.turbine.services.Initable, PortalAuthentication, org.apache.turbine.services.Service

public class NoAuthentication
extends org.apache.turbine.services.TurbineBaseService
implements PortalAuthentication

The NoAuthentication class is a Jetspeed security provider, implementing the PortalAuthentication interface. It provides no authentication - all login attempts are allowed.

Version:
$Id: NoAuthentication.java,v 1.3 2004/02/23 03:53:24 jford Exp $
Author:
Glenn R. Golden

Field Summary
 
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, properties, serviceBroker
 
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
 
Fields inherited from interface org.apache.jetspeed.services.security.PortalAuthentication
SERVICE_NAME
 
Constructor Summary
NoAuthentication()
           
 
Method Summary
 JetspeedUser getAnonymousUser()
          Automatically authenticates and retrieves the portal anonymous user.
protected  JetspeedRunData getRunData()
           
protected  JetspeedUser getUserFromContext()
           
 void init()
          Performs late initialization.
 JetspeedUser login(java.lang.String username, java.lang.String password)
          Given a public credential(username) and private credential(password), perform authentication.
 void logout()
          Logout the JetspeedUser.
protected  JetspeedRunData putUserIntoContext(JetspeedUser user)
           
 
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, setInitableBroker, shutdown
 

Constructor Detail

NoAuthentication

public NoAuthentication()
Method Detail

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()
          throws org.apache.turbine.services.InitializationException
Performs late initialization. Called just before the first use of the service. If your class relies on early initialization, and the object it expects was not received, you can use late initialization to throw an exception and complain.

Specified by:
init in interface org.apache.turbine.services.Initable
Throws:
InitializationException, - if initialization of this class was not successful.
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.