Class OpenIdConfiguration

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.security.openid.OpenIdConfiguration
All Implemented Interfaces:
org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.LifeCycle

public class OpenIdConfiguration extends org.eclipse.jetty.util.component.ContainerLifeCycle
Holds the configuration for an OpenID Connect service. This uses the OpenID Provider URL with the path CONFIG_PATH to discover the required information about the OIDC service.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

    org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpenIdConfiguration(String provider, String clientId, String clientSecret)
    Create an OpenID configuration for a specific OIDC provider.
    OpenIdConfiguration(String issuer, String authorizationEndpoint, String tokenEndpoint, String clientId, String clientSecret, String authMethod, org.eclipse.jetty.client.HttpClient httpClient)
    Create an OpenID configuration for a specific OIDC provider.
    OpenIdConfiguration(String issuer, String authorizationEndpoint, String tokenEndpoint, String clientId, String clientSecret, org.eclipse.jetty.client.HttpClient httpClient)
    Create an OpenID configuration for a specific OIDC provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addScopes(String... scopes)
     
    protected void
     
     
     
     
     
    org.eclipse.jetty.client.HttpClient
     
     
     
     

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, destroy, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.util.component.Container

    getCachedBeans, getEventListeners

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

    dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable
  • Constructor Details

    • OpenIdConfiguration

      public OpenIdConfiguration(String provider, String clientId, String clientSecret)
      Create an OpenID configuration for a specific OIDC provider.
      Parameters:
      provider - The URL of the OpenID provider.
      clientId - OAuth 2.0 Client Identifier valid at the Authorization Server.
      clientSecret - The client secret known only by the Client and the Authorization Server.
    • OpenIdConfiguration

      public OpenIdConfiguration(String issuer, String authorizationEndpoint, String tokenEndpoint, String clientId, String clientSecret, org.eclipse.jetty.client.HttpClient httpClient)
      Create an OpenID configuration for a specific OIDC provider.
      Parameters:
      issuer - The URL of the OpenID provider.
      authorizationEndpoint - the URL of the OpenID provider's authorization endpoint if configured.
      tokenEndpoint - the URL of the OpenID provider's token endpoint if configured.
      clientId - OAuth 2.0 Client Identifier valid at the Authorization Server.
      clientSecret - The client secret known only by the Client and the Authorization Server.
      httpClient - The HttpClient instance to use.
    • OpenIdConfiguration

      public OpenIdConfiguration(String issuer, String authorizationEndpoint, String tokenEndpoint, String clientId, String clientSecret, String authMethod, org.eclipse.jetty.client.HttpClient httpClient)
      Create an OpenID configuration for a specific OIDC provider.
      Parameters:
      issuer - The URL of the OpenID provider.
      authorizationEndpoint - the URL of the OpenID provider's authorization endpoint if configured.
      tokenEndpoint - the URL of the OpenID provider's token endpoint if configured.
      clientId - OAuth 2.0 Client Identifier valid at the Authorization Server.
      clientSecret - The client secret known only by the Client and the Authorization Server.
      authMethod - Authentication method to use with the Token Endpoint.
      httpClient - The HttpClient instance to use.
  • Method Details

    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.eclipse.jetty.util.component.ContainerLifeCycle
      Throws:
      Exception
    • getHttpClient

      public org.eclipse.jetty.client.HttpClient getHttpClient()
    • getAuthEndpoint

      public String getAuthEndpoint()
    • getClientId

      public String getClientId()
    • getClientSecret

      public String getClientSecret()
    • getIssuer

      public String getIssuer()
    • getTokenEndpoint

      public String getTokenEndpoint()
    • getAuthMethod

      public String getAuthMethod()
    • addScopes

      public void addScopes(String... scopes)
    • getScopes

      public List<String> getScopes()