org.drools.guvnor.server
Class SecurityServiceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.drools.guvnor.server.SecurityServiceServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, SecurityService

public class SecurityServiceServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements SecurityService

Wrapper for GWT RPC.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
SecurityServiceServlet()
           
 
Method Summary
protected  void doUnexpectedFailure(Throwable e)
           
 UserSecurityContext getCurrentUser()
           
 Capabilities getUserCapabilities()
          This will return the capabilities which determine what is shown in the GUI.
 boolean login(String userName, String password)
          This will do a password authentication, using the configured JAAS provider.
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityServiceServlet

public SecurityServiceServlet()
Method Detail

doUnexpectedFailure

protected void doUnexpectedFailure(Throwable e)
Overrides:
doUnexpectedFailure in class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

getCurrentUser

public UserSecurityContext getCurrentUser()
Specified by:
getCurrentUser in interface SecurityService
Returns:
This returns the current user's name if they are logged in. If not then null is returned (inside a context). Will also return some other handy stuff for changing the GUI based on security context.

getUserCapabilities

public Capabilities getUserCapabilities()
Description copied from interface: SecurityService
This will return the capabilities which determine what is shown in the GUI. Based on the users roles and permissions.

Specified by:
getUserCapabilities in interface SecurityService

login

public boolean login(String userName,
                     String password)
Description copied from interface: SecurityService
This will do a password authentication, using the configured JAAS provider. This may be a default one (which allows anything in).

Specified by:
login in interface SecurityService
Returns:
true if user is logged in successfully.


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.