org.springframework.extensions.surf.support
Class DefaultUserFactory

java.lang.Object
  extended by org.springframework.extensions.surf.support.BaseFactory
      extended by org.springframework.extensions.surf.support.AbstractUserFactory
          extended by org.springframework.extensions.surf.support.DefaultUserFactory
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, UserFactory

public class DefaultUserFactory
extends AbstractUserFactory

The default Web Framework implementation of UserFactory. This is a very uninteresting user factory which simply returns unauthenticated users. In other words, all users essentially authenticate which allows a site to run in "guest" mode (NOP users).

Author:
muzquiano

Field Summary
 
Fields inherited from interface org.springframework.extensions.surf.UserFactory
SESSION_ATTRIBUTE_EXTERNAL_AUTH, SESSION_ATTRIBUTE_KEY_USER_ID, SESSION_ATTRIBUTE_KEY_USER_OBJECT, USER_GUEST
 
Constructor Summary
DefaultUserFactory()
           
 
Method Summary
 boolean authenticate(javax.servlet.http.HttpServletRequest request, String username, String password)
          Authentication the user given the supplied username/password
 User loadUser(RequestContext context, String userId)
          Load the user from a store
 User loadUser(RequestContext context, String userId, String endpointId)
          Load the user from a store
 
Methods inherited from class org.springframework.extensions.surf.support.AbstractUserFactory
faultUser, faultUser, faultUser, faultUser, getGuestUser
 
Methods inherited from class org.springframework.extensions.surf.support.BaseFactory
getApplicationContext, getResourceService, getServiceRegistry, getWebFrameworkConfiguration, getWebFrameworkManager, setApplicationContext, setServiceRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUserFactory

public DefaultUserFactory()
Method Detail

authenticate

public boolean authenticate(javax.servlet.http.HttpServletRequest request,
                            String username,
                            String password)
Description copied from class: AbstractUserFactory
Authentication the user given the supplied username/password

Specified by:
authenticate in interface UserFactory
Specified by:
authenticate in class AbstractUserFactory
Returns:
success/failure

loadUser

public User loadUser(RequestContext context,
                     String userId,
                     String endpointId)
              throws UserFactoryException
Description copied from class: AbstractUserFactory
Load the user from a store

Specified by:
loadUser in interface UserFactory
Specified by:
loadUser in class AbstractUserFactory
Returns:
User
Throws:
UserFactoryException

loadUser

public User loadUser(RequestContext context,
                     String userId)
              throws UserFactoryException
Description copied from class: AbstractUserFactory
Load the user from a store

Specified by:
loadUser in interface UserFactory
Specified by:
loadUser in class AbstractUserFactory
Returns:
User
Throws:
UserFactoryException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.