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

Examples of org.jboss.seam.security.external.openid.providers.OpenIdProvider


        }
        return null;
    }

    public void authenticate() {
        OpenIdProvider selectedProvider = getSelectedProvider();
        if (selectedProvider == null) {
            throw new IllegalStateException("No OpenID provider has been selected");
        }

        OpenIdRelyingPartyApi openIdApi = openIdApiInstance.get();

        List<OpenIdRequestedAttribute> attributes = new LinkedList<OpenIdRequestedAttribute>();

        selectedProvider.requestAttributes(openIdApi, attributes);

        openIdApi.login(selectedProvider.getUrl(), attributes, getResponse());

        setStatus(AuthenticationStatus.DEFERRED);
    }
View Full Code Here


      OpenIdRelyingPartyApi openIdApi = openIdApiInstance.get();
     
      List<OpenIdRequestedAttribute> attributes = new LinkedList<OpenIdRequestedAttribute>();
      attributes.add(openIdApi.createOpenIdRequestedAttribute("email", "http://schema.openid.net/contact/email", true, 1));
     
      OpenIdProvider selectedProvider = getSelectedProvider();
      if (selectedProvider == null)
      {
         throw new IllegalStateException("No OpenID provider has been selected");
      }
     
      if (log.isDebugEnabled()) log.debug("Logging in using OpenID url: " + selectedProvider.getUrl());
     
      openIdApi.login(selectedProvider.getUrl(), attributes,
            (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse());     
     
      setStatus(AuthenticationStatus.DEFERRED);
   }
View Full Code Here

TOP

Related Classes of org.jboss.seam.security.external.openid.providers.OpenIdProvider

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.