JAASLoginService.java :  » J2EE » jfox » org » jfox » ejb3 » security » Java Open Source

Java Open Source » J2EE » jfox 
jfox » org » jfox » ejb3 » security » JAASLoginService.java
/*
 * 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;
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.