Package org.jboss.seam.security.external.openid

Source Code of org.jboss.seam.security.external.openid.OpenIdServerManagerFactory

package org.jboss.seam.security.external.openid;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;

import org.openid4java.server.ServerManager;

/**
* @author Marcel Kolsteren
*
*/
@ApplicationScoped
public class OpenIdServerManagerFactory
{
   private ServerManager serverManager;

   @Inject
   private OpenIdProviderBean providerBean;

   @Produces
   public ServerManager getServerManager()
   {
      return serverManager;
   }

   @Inject
   public void startup() throws Exception
   {
      serverManager = new ServerManager();
      serverManager.setOPEndpointUrl(providerBean.getServiceURL(OpenIdService.OPEN_ID_SERVICE));
   }
}
TOP

Related Classes of org.jboss.seam.security.external.openid.OpenIdServerManagerFactory

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.