org.springframework.extensions.surf
Interface UserFactory

All Known Implementing Classes:
AbstractUserFactory, AlfrescoUserFactory, DefaultUserFactory

public interface UserFactory

Defines the user factory interface

Author:
muzquiano

Field Summary
static String SESSION_ATTRIBUTE_EXTERNAL_AUTH
          flag to set in the user Session when an external authentication mechanism is used this informs the framework that user cannot Change Password or Logout in the usual way
static String SESSION_ATTRIBUTE_KEY_USER_ID
          User name id key in the session
static String SESSION_ATTRIBUTE_KEY_USER_OBJECT
          User object key in the session
static String USER_GUEST
          Guest user name key
 
Method Summary
 boolean authenticate(javax.servlet.http.HttpServletRequest request, String username, String password)
          Authenticates the given user credentials against the user provider
 User faultUser(RequestContext context, javax.servlet.http.HttpServletRequest request)
          Loads a user from the remote user store and store it into the session.
 User faultUser(RequestContext context, javax.servlet.http.HttpServletRequest request, boolean force)
          Loads a user from the remote user store and stores it into the session.
 User faultUser(RequestContext context, javax.servlet.http.HttpServletRequest request, String endpoint)
          Loads a user from the remote user store and store it into the session.
 User faultUser(RequestContext context, javax.servlet.http.HttpServletRequest request, String endpoint, boolean force)
          Loads a user from the remote user store and stores it into the session.
 User loadUser(RequestContext context, String userId)
          Loads a user object from the default endpoint.
 User loadUser(RequestContext context, String userId, String endpointId)
          Loads a user object from the given endpoint.
 

Field Detail

USER_GUEST

static final String USER_GUEST
Guest user name key

See Also:
Constant Field Values

SESSION_ATTRIBUTE_KEY_USER_OBJECT

static final String SESSION_ATTRIBUTE_KEY_USER_OBJECT
User object key in the session

See Also:
Constant Field Values

SESSION_ATTRIBUTE_KEY_USER_ID

static final String SESSION_ATTRIBUTE_KEY_USER_ID
User name id key in the session

See Also:
Constant Field Values

SESSION_ATTRIBUTE_EXTERNAL_AUTH

static final String SESSION_ATTRIBUTE_EXTERNAL_AUTH
flag to set in the user Session when an external authentication mechanism is used this informs the framework that user cannot Change Password or Logout in the usual way

See Also:
Constant Field Values
Method Detail

authenticate

boolean authenticate(javax.servlet.http.HttpServletRequest request,
                     String username,
                     String password)
Authenticates the given user credentials against the user provider

Parameters:
request -
username -
password -
Returns:

faultUser

User faultUser(RequestContext context,
               javax.servlet.http.HttpServletRequest request)
               throws UserFactoryException
Loads a user from the remote user store and store it into the session.

Parameters:
context -
request -
Returns:
User
Throws:
UserFactoryException

faultUser

User faultUser(RequestContext context,
               javax.servlet.http.HttpServletRequest request,
               String endpoint)
               throws UserFactoryException
Loads a user from the remote user store and store it into the session.

Parameters:
context -
request -
endpoint -
Returns:
User
Throws:
UserFactoryException

faultUser

User faultUser(RequestContext context,
               javax.servlet.http.HttpServletRequest request,
               boolean force)
               throws UserFactoryException
Loads a user from the remote user store and stores it into the session. If the force flag is set, the current in-session user object will be purged, forcing the user object to reload.

Parameters:
context -
request -
force -
Returns:
User
Throws:
UserFactoryException

faultUser

User faultUser(RequestContext context,
               javax.servlet.http.HttpServletRequest request,
               String endpoint,
               boolean force)
               throws UserFactoryException
Loads a user from the remote user store and stores it into the session. If the force flag is set, the current in-session user object will be purged, forcing the user object to reload.

Parameters:
context -
request -
endpoint -
force -
Returns:
User
Throws:
UserFactoryException

loadUser

User loadUser(RequestContext context,
              String userId)
              throws UserFactoryException
Loads a user object from the default endpoint.

Parameters:
context -
userId -
Returns:
Throws:
UserFactoryException

loadUser

User loadUser(RequestContext context,
              String userId,
              String endpointId)
              throws UserFactoryException
Loads a user object from the given endpoint.

Parameters:
context -
userId -
endpointId -
Returns:
Throws:
UserFactoryException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.