/*
* JFox - The most lightweight Java EE Application Server!
* more details please visit http://www.huihoo.org/jfox or http://www.jfox.org.cn.
*
* JFox is licenced and re-distributable under GNU LGPL.
*/
package org.jfox.ejb3.security;
import javax.security.auth.callback.CallbackHandler;
import javax.servlet.http.HttpServletRequest;
import org.jfox.mvc.SessionContext;
import org.jfox.framework.component.Component;
import org.jfox.framework.annotation.Exported;
/**
* @author <a href="mailto:jfox.young@gmail.com">Young Yang</a>
*/
@Exported
public interface JAASLoginService extends Component {
static ThreadLocal<JAASLoginRequestCallback> loginRequestThreadLocal = new ThreadLocal<JAASLoginRequestCallback>();
static ThreadLocal<JAASLoginResponseCallback> loginResponseThreadLocal = new ThreadLocal<JAASLoginResponseCallback>();
/**
* Servlet
*
* @param request http servlet request
* @param callbackHandler callbackclient
* @param params
* @return AccountcallbackHandlerJAASLoginResponseCallback.setCallbackObject
* @throws Exception
*/
public Object login(HttpServletRequest request, CallbackHandler callbackHandler, String... params) throws Exception;
/**
* ActionSessionContext
*
* @param sessionContext session context
* @param callbackHandler callbackclient
* @param params
* @return AccountcallbackHandlerJAASLoginResponseCallback.setCallbackObject
* @throws Exception
*/
public Object login(SessionContext sessionContext, CallbackHandler callbackHandler, String... params) throws Exception;
}
|