Package net.vinant.idp4java

Source Code of net.vinant.idp4java.EndpointServlet

package net.vinant.idp4java;

import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.openid4java.server.ServerManager;

import net.vinant.idp4java.base.BaseServiceProxy;
import net.vinant.idp4java.openid4javaImpl.SimpleServiceProxy;

/**
* Servlet implementation class SimpleServer
*/
public class EndpointServlet extends HttpServlet {
  private static final long serialVersionUID = 1L;
     
  SimpleServiceProxy _serviceProxy = null;
 

    @Override
    public void init(ServletConfig config) throws ServletException {
      super.init(config);
      _serviceProxy = new SimpleServiceProxy(new ServerManager());
    }

  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    _serviceProxy.getProtocolImplementation().handle(request, response);
  }

  /**
   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      //BaseServiceProxy serviceProxy = new SimpleServiceProxy();
    _serviceProxy.getProtocolImplementation().handle(request, response);
  }

}
TOP

Related Classes of net.vinant.idp4java.EndpointServlet

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.