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:
Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
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 AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOpenIdConfiguration(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, HttpClient httpClient) Create an OpenID configuration for a specific OIDC provider.OpenIdConfiguration(String issuer, String authorizationEndpoint, String tokenEndpoint, String clientId, String clientSecret, HttpClient httpClient) Create an OpenID configuration for a specific OIDC provider. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voiddoStart()Starts the managed lifecycle beans in the order they were added.fetchOpenIdConnectMetadata(String provider, HttpClient httpClient) private static HttpClientMethods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansMethods inherited from class AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Dumpable.DumpableContainer
isDumpable
-
Field Details
-
LOG
-
CONFIG_PATH
- See Also:
-
httpClient
-
issuer
-
clientId
-
clientSecret
-
scopes
-
authMethod
-
authEndpoint
-
tokenEndpoint
-
-
Constructor Details
-
OpenIdConfiguration
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, 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- TheHttpClientinstance to use.
-
OpenIdConfiguration
public OpenIdConfiguration(String issuer, String authorizationEndpoint, String tokenEndpoint, String clientId, String clientSecret, String authMethod, 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- TheHttpClientinstance to use.
-
-
Method Details
-
doStart
Description copied from class:ContainerLifeCycleStarts the managed lifecycle beans in the order they were added.- Overrides:
doStartin classContainerLifeCycle- Throws:
Exception
-
newHttpClient
-
fetchOpenIdConnectMetadata
private static Map<String,Object> fetchOpenIdConnectMetadata(String provider, HttpClient httpClient) -
getHttpClient
-
getAuthEndpoint
-
getClientId
-
getClientSecret
-
getIssuer
-
getTokenEndpoint
-
getAuthMethod
-
addScopes
-
getScopes
-