net.pleso.auth.server
Class DefaultAuthServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
              extended by net.pleso.auth.server.DefaultAuthServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, AuthService

public class DefaultAuthServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements AuthService

Default implementation of AuthService. Use HttpSession like authentication parameters container. Extend this implementation in your application for IAuthProvider initialization.

See Also:
Serialized Form

Constructor Summary
DefaultAuthServiceImpl()
           
 
Method Summary
static java.util.Properties getAuthProps(javax.servlet.http.HttpServletRequest request)
          Statically gets authentication properties by external HttpServletRequest instance.
 IAuthProvider getAuthProviderImpl()
          Gets IAuthProvider implementation.
 UserInfo getUserInfo()
          Gets authenticated user information.
 java.lang.String[] isAuth()
          Check is user authenticated.
 java.lang.String[] loginUser(UserInfo user)
          Login user with login and password information.
 void logout()
          Logout user.
 void setAuthProviderImpl(IAuthProvider authProviderImpl)
          Sets IAuthProvider implementation.
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
doPost, processCall
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuthServiceImpl

public DefaultAuthServiceImpl()
Method Detail

loginUser

public java.lang.String[] loginUser(UserInfo user)
                             throws AuthenticationException
Description copied from interface: AuthService
Login user with login and password information.

Specified by:
loginUser in interface AuthService
Parameters:
user - user information
Returns:
array of authenticated objects (to which user has access).
Throws:
AuthenticationException

logout

public void logout()
Description copied from interface: AuthService
Logout user.

Specified by:
logout in interface AuthService

isAuth

public java.lang.String[] isAuth()
                          throws AuthenticationException
Description copied from interface: AuthService
Check is user authenticated. Return null if user is not authenticated.

Specified by:
isAuth in interface AuthService
Returns:
array of authenticated objects (to which user has access).
Throws:
AuthenticationException

getUserInfo

public UserInfo getUserInfo()
                     throws AuthenticationException
Description copied from interface: AuthService
Gets authenticated user information.

Specified by:
getUserInfo in interface AuthService
Returns:
authenticated user information
Throws:
AuthenticationException

getAuthProps

public static java.util.Properties getAuthProps(javax.servlet.http.HttpServletRequest request)
                                         throws AuthenticationException
Statically gets authentication properties by external HttpServletRequest instance. Use DefaultAuthServiceImpl.getAuthProps(this.getThreadLocalRequest()) in your RPC servlet.

Parameters:
request - HttpServletRequest instance from external RPC servlet
Returns:
authentication properties
Throws:
AuthenticationException

getAuthProviderImpl

public IAuthProvider getAuthProviderImpl()
Gets IAuthProvider implementation.

Returns:
IAuthProvider implementation

setAuthProviderImpl

public void setAuthProviderImpl(IAuthProvider authProviderImpl)
Sets IAuthProvider implementation.

Parameters:
authProviderImpl - IAuthProvider implementation


Copyright © 2006-2007 pleso.net crew All Rights Reserved.