Package org.jboss.identity.federation.api.openid

Examples of org.jboss.identity.federation.api.openid.OpenIDManager


     
      String userEntry = req.getParameter("openid");
      OpenIDRequest openIDReq = new OpenIDRequest(userEntry);
     
      HttpSession session = req.getSession();
      OpenIDManager manager = (OpenIDManager) session.getAttribute("openid_manager");
      if(manager == null)
      {
         manager = new OpenIDManager(openIDReq);
         session.setAttribute("openid_manager", manager);
      }
     
      try
      {
         OpenIDProviderList listOfProviders = manager.discoverProviders();
         HTTPOpenIDContext httpOpenIDCtx = new HTTPOpenIDContext(req,resp, this.servletContext);
         httpOpenIDCtx.setReturnURL(returnURL);
        
         HTTPProtocolAdaptor adapter = new HTTPProtocolAdaptor(httpOpenIDCtx);
         OpenIDProviderInformation providerInfo = manager.associate(adapter, listOfProviders);
         manager.authenticate(adapter, providerInfo);
      }
      catch (OpenIDGeneralException e)
      {
         log("[OpenIDConsumerServlet]Exception in dealing with the provider:",e);
         resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
View Full Code Here


     
      String userEntry = req.getParameter("openid");
      OpenIDRequest openIDReq = new OpenIDRequest(userEntry);
     
      HttpSession session = req.getSession();
      OpenIDManager manager = (OpenIDManager) session.getAttribute("openid_manager");
      if(manager == null)
      {
         manager = new OpenIDManager(openIDReq);
         session.setAttribute("openid_manager", manager);
      }
     
      try
      {
         OpenIDProviderList listOfProviders = manager.discoverProviders();
         HTTPOpenIDContext httpOpenIDCtx = new HTTPOpenIDContext(req,resp, this.servletContext);
         httpOpenIDCtx.setReturnURL(returnURL);
        
         HTTPProtocolAdaptor adapter = new HTTPProtocolAdaptor(httpOpenIDCtx);
         OpenIDProviderInformation providerInfo = manager.associate(adapter, listOfProviders);
         manager.authenticate(adapter, providerInfo);
      }
      catch (OpenIDGeneralException e)
      {
         log("[OpenIDConsumerServlet]Exception in dealing with the provider:",e);
         resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.api.openid.OpenIDManager

Copyright © 2018 www.massapicom. 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.