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.ContainerLifeCycleHolds the configuration for an OpenID Connect service. This uses the OpenID Provider URL with the pathCONFIG_PATHto 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
-
-
Constructor Summary
Constructors Constructor Description OpenIdConfiguration(java.lang.String provider, java.lang.String clientId, java.lang.String clientSecret)Create an OpenID configuration for a specific OIDC provider.OpenIdConfiguration(java.lang.String issuer, java.lang.String authorizationEndpoint, java.lang.String tokenEndpoint, java.lang.String clientId, java.lang.String clientSecret, java.lang.String authMethod, org.eclipse.jetty.client.HttpClient httpClient)Create an OpenID configuration for a specific OIDC provider.OpenIdConfiguration(java.lang.String issuer, java.lang.String authorizationEndpoint, java.lang.String tokenEndpoint, java.lang.String clientId, java.lang.String clientSecret, org.eclipse.jetty.client.HttpClient httpClient)Create an OpenID configuration for a specific OIDC provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddScopes(java.lang.String... scopes)protected voiddoStart()java.lang.StringgetAuthEndpoint()java.lang.StringgetAuthMethod()java.lang.StringgetClientId()java.lang.StringgetClientSecret()org.eclipse.jetty.client.HttpClientgetHttpClient()java.lang.StringgetIssuer()java.util.List<java.lang.String>getScopes()java.lang.StringgetTokenEndpoint()booleanisAuthenticateNewUsers()voidsetAuthenticateNewUsers(boolean authenticateNewUsers)java.lang.StringtoString()-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
OpenIdConfiguration
public OpenIdConfiguration(java.lang.String provider, java.lang.String clientId, java.lang.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(java.lang.String issuer, java.lang.String authorizationEndpoint, java.lang.String tokenEndpoint, java.lang.String clientId, java.lang.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- TheHttpClientinstance to use.
-
OpenIdConfiguration
public OpenIdConfiguration(java.lang.String issuer, java.lang.String authorizationEndpoint, java.lang.String tokenEndpoint, java.lang.String clientId, java.lang.String clientSecret, java.lang.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- TheHttpClientinstance to use.
-
-
Method Detail
-
doStart
protected void doStart() throws java.lang.Exception- Overrides:
doStartin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
java.lang.Exception
-
getHttpClient
public org.eclipse.jetty.client.HttpClient getHttpClient()
-
getAuthEndpoint
public java.lang.String getAuthEndpoint()
-
getClientId
public java.lang.String getClientId()
-
getClientSecret
public java.lang.String getClientSecret()
-
getIssuer
public java.lang.String getIssuer()
-
getTokenEndpoint
public java.lang.String getTokenEndpoint()
-
getAuthMethod
public java.lang.String getAuthMethod()
-
addScopes
public void addScopes(java.lang.String... scopes)
-
getScopes
public java.util.List<java.lang.String> getScopes()
-
isAuthenticateNewUsers
public boolean isAuthenticateNewUsers()
-
setAuthenticateNewUsers
public void setAuthenticateNewUsers(boolean authenticateNewUsers)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.eclipse.jetty.util.component.AbstractLifeCycle
-
-