Class OpenIdSsoSecurityRealm

All Implemented Interfaces:
ExtensionPoint, Describable<SecurityRealm>

public class OpenIdSsoSecurityRealm extends SecurityRealm
SSO based on OpenID by fixing a provider.
Author:
Kohsuke Kawaguchi
  • Field Details

    • endpoint

      public final String endpoint
  • Constructor Details

    • OpenIdSsoSecurityRealm

      @DataBoundConstructor public OpenIdSsoSecurityRealm(String endpoint) throws IOException, org.openid4java.OpenIDException
      Throws:
      IOException
      org.openid4java.OpenIDException
  • Method Details

    • createManager

      protected org.openid4java.consumer.ConsumerManager createManager() throws org.openid4java.consumer.ConsumerException
      Throws:
      org.openid4java.consumer.ConsumerException
    • addProxyPropertiesToHttpClient

      protected void addProxyPropertiesToHttpClient()
    • getLoginUrl

      public String getLoginUrl()
      Login begins with our doCommenceLogin(String) method.
      Overrides:
      getLoginUrl in class SecurityRealm
    • createSecurityComponents

      public SecurityRealm.SecurityComponents createSecurityComponents()
      Acegi has this notion that first an Authentication object is created by collecting user information and then the act of authentication is done later (by AuthenticationManager) to verify it. But in case of OpenID, we create an Authentication only after we verified the user identity, so AuthenticationManager becomes no-op.
      Specified by:
      createSecurityComponents in class SecurityRealm
      Returns:
      Created SecurityRealm.SecurityComponents
    • doCommenceLogin

      public org.kohsuke.stapler.HttpResponse doCommenceLogin(@QueryParameter String from) throws IOException, org.openid4java.OpenIDException
      The login process starts from here.
      Throws:
      IOException
      org.openid4java.OpenIDException
    • doFinishLogin

      public org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest2 request) throws IOException, org.openid4java.OpenIDException
      This is where the user comes back to at the end of the OpenID redirect ping-pong.
      Throws:
      IOException
      org.openid4java.OpenIDException
    • isApplicable

      public boolean isApplicable(OpenIdExtension openIdExtension)
      Allow OpenId SSO Security Realms to determine the extensions that are applicable.
      Parameters:
      openIdExtension - the extension.
      Returns:
      true if this extension is appropriate.
      Since:
      2.2