Class OAuth2AuthenticationProviderImpl
- java.lang.Object
-
- org.apache.qpid.server.model.AbstractConfiguredObject<T>
-
- org.apache.qpid.server.security.auth.manager.AbstractAuthenticationManager<OAuth2AuthenticationProviderImpl>
-
- org.apache.qpid.server.security.auth.manager.oauth2.OAuth2AuthenticationProviderImpl
-
- All Implemented Interfaces:
EventLoggerProvider
,AuthenticationProvider<OAuth2AuthenticationProviderImpl>
,ConfiguredObject<OAuth2AuthenticationProviderImpl>
,ContextProvider
,PermissionedObject
,TaskExecutorProvider
,CachingAuthenticationProvider<OAuth2AuthenticationProviderImpl>
,OAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
public class OAuth2AuthenticationProviderImpl extends AbstractAuthenticationManager<OAuth2AuthenticationProviderImpl> implements OAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
SECURED_STRING_VALUE
-
Fields inherited from interface org.apache.qpid.server.security.auth.manager.CachingAuthenticationProvider
AUTHENTICATION_CACHE_EXPIRATION_TIME, AUTHENTICATION_CACHE_ITERATION_COUNT, AUTHENTICATION_CACHE_MAX_SIZE, DEFAULT_AUTHENTICATION_CACHE_EXPIRATION_TIME, DEFAULT_AUTHENTICATION_CACHE_ITERATION_COUNT, DEFAULT_AUTHENTICATION_CACHE_MAX_SIZE
-
Fields inherited from interface org.apache.qpid.server.model.ConfiguredObject
AWAIT_ATTAINMENT_TIMEOUT, CONTEXT, CREATED_BY, CREATED_TIME, DEFAULT_AWAIT_ATTAINMENT_TIMEOUT, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
-
Fields inherited from interface org.apache.qpid.server.security.auth.manager.oauth2.OAuth2AuthenticationProvider
AUTHENTICATION_OAUTH2_CONNECT_TIMEOUT, AUTHENTICATION_OAUTH2_READ_TIMEOUT, DEFAULT_AUTHENTICATION_OAUTH2_CONNECT_TIMEOUT, DEFAULT_AUTHENTICATION_OAUTH2_READ_TIMEOUT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OAuth2AuthenticationProviderImpl(java.util.Map<java.lang.String,java.lang.Object> attributes, Container<?> container)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationResult
authenticateViaAccessToken(java.lang.String accessToken, NamedAddressSpace addressSpace)
AuthenticationResult
authenticateViaAuthorizationCode(java.lang.String authorizationCode, java.lang.String redirectUri, NamedAddressSpace addressSpace)
SaslNegotiator
createSaslNegotiator(java.lang.String mechanism, SaslSettings saslSettings, NamedAddressSpace addressSpace)
java.net.URI
getAuthorizationEndpointURI()
java.net.URI
getAuthorizationEndpointURI(NamedAddressSpace addressSpace)
java.lang.String
getClientId()
java.lang.String
getClientSecret()
int
getConnectTimeout()
java.net.URI
getDefaultAuthorizationEndpointURI()
java.net.URI
getDefaultIdentityResolverEndpointURI()
java.lang.String
getDefaultScope()
java.net.URI
getDefaultTokenEndpointURI()
java.net.URI
getIdentityResolverEndpointURI()
java.net.URI
getIdentityResolverEndpointURI(NamedAddressSpace addressSpace)
java.lang.String
getIdentityResolverType()
java.util.List<java.lang.String>
getMechanisms()
Gets the SASL mechanisms known to this manager.java.net.URI
getPostLogoutURI()
int
getReadTimeout()
java.lang.String
getScope()
java.util.List<java.lang.String>
getTlsCipherSuiteAllowList()
java.util.List<java.lang.String>
getTlsCipherSuiteDenyList()
java.util.List<java.lang.String>
getTlsProtocolAllowList()
java.util.List<java.lang.String>
getTlsProtocolDenyList()
boolean
getTokenEndpointNeedsAuth()
java.net.URI
getTokenEndpointURI()
java.net.URI
getTokenEndpointURI(NamedAddressSpace addressSpace)
TrustStore
getTrustStore()
protected void
onOpen()
void
onValidate()
Validation performed for configured object creation and opening.protected void
validateChange(ConfiguredObject<?> proxyForValidation, java.util.Set<java.lang.String> changedAttributes)
static java.util.Collection<java.lang.String>
validIdentityResolvers()
-
Methods inherited from class org.apache.qpid.server.security.auth.manager.AbstractAuthenticationManager
activate, getAvailableMechanisms, getDisabledMechanisms, getEventLogger, getSecureOnlyMechanisms, logCreated, logDeleted, logOperation, logRecovered, logUpdated, startQuiesced
-
Methods inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
addChangeListener, addChildAsync, addFutureCallback, applyToChildren, asObjectRecord, attainState, attributesAsString, attributeSet, authorise, authorise, authorise, authoriseCreateChild, awaitChildClassToAttainState, awaitChildClassToAttainState, beforeClose, beforeDelete, changeAttributes, childAdded, childRemoved, close, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleteChildren, deleteNoChecks, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getAccessControl, getActualAttributes, getAncestor, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getSubjectWithAddedSystemRights, getSystemPrincipal, getSystemTaskControllerContext, getSystemTaskSubject, getSystemTaskSubject, getTaskExecutor, getType, getTypeClass, getUserPreferences, handleExceptionOnOpen, hasEncrypter, isDurable, isSystemProcess, isSystemSubject, managesChildStorage, newToken, notifyStateChanged, onClose, onCreate, onDelete, onExceptionInOpen, onResolve, open, openAsync, postResolve, postResolveChildren, postSetAttributes, registerWithParents, removeChangeListener, removeContextVariable, rethrowRuntimeExceptionsOnOpen, runTask, setAttributes, setAttributesAsync, setContextVariable, setEncrypter, setState, setUserPreferences, start, startAsync, stop, toString, updateModel, validateChildDelete, validateOnCreate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.model.AuthenticationProvider
getAvailableMechanisms, getDisabledMechanisms
-
Methods inherited from interface org.apache.qpid.server.model.ConfiguredObject
addChangeListener, asObjectRecord, authorise, authorise, authorise, close, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getType, getTypeClass, getUserPreferences, hasEncrypter, isDurable, managesChildStorage, newToken, open, openAsync, removeChangeListener, removeContextVariable, setAttributes, setAttributesAsync, setContextVariable, setUserPreferences
-
Methods inherited from interface org.apache.qpid.server.model.ContextProvider
getContextKeys, getContextValue, getContextValue
-
Methods inherited from interface org.apache.qpid.server.logging.EventLoggerProvider
getEventLogger
-
Methods inherited from interface org.apache.qpid.server.security.auth.manager.oauth2.OAuth2AuthenticationProvider
getSecureOnlyMechanisms
-
Methods inherited from interface org.apache.qpid.server.model.TaskExecutorProvider
getTaskExecutor
-
-
-
-
Constructor Detail
-
OAuth2AuthenticationProviderImpl
protected OAuth2AuthenticationProviderImpl(java.util.Map<java.lang.String,java.lang.Object> attributes, Container<?> container)
-
-
Method Detail
-
onOpen
protected void onOpen()
- Overrides:
onOpen
in classAbstractConfiguredObject<OAuth2AuthenticationProviderImpl>
-
validateChange
protected void validateChange(ConfiguredObject<?> proxyForValidation, java.util.Set<java.lang.String> changedAttributes)
- Overrides:
validateChange
in classAbstractConfiguredObject<OAuth2AuthenticationProviderImpl>
-
onValidate
public void onValidate()
Description copied from class:AbstractConfiguredObject
Validation performed for configured object creation and opening.- Overrides:
onValidate
in classAbstractAuthenticationManager<OAuth2AuthenticationProviderImpl>
-
getMechanisms
public java.util.List<java.lang.String> getMechanisms()
Description copied from interface:AuthenticationProvider
Gets the SASL mechanisms known to this manager.- Specified by:
getMechanisms
in interfaceAuthenticationProvider<OAuth2AuthenticationProviderImpl>
- Returns:
- SASL mechanism names, space separated.
-
createSaslNegotiator
public SaslNegotiator createSaslNegotiator(java.lang.String mechanism, SaslSettings saslSettings, NamedAddressSpace addressSpace)
- Specified by:
createSaslNegotiator
in interfaceAuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
authenticateViaAuthorizationCode
public AuthenticationResult authenticateViaAuthorizationCode(java.lang.String authorizationCode, java.lang.String redirectUri, NamedAddressSpace addressSpace)
- Specified by:
authenticateViaAuthorizationCode
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
authenticateViaAccessToken
public AuthenticationResult authenticateViaAccessToken(java.lang.String accessToken, NamedAddressSpace addressSpace)
- Specified by:
authenticateViaAccessToken
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getAuthorizationEndpointURI
public java.net.URI getAuthorizationEndpointURI()
- Specified by:
getAuthorizationEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getAuthorizationEndpointURI
public java.net.URI getAuthorizationEndpointURI(NamedAddressSpace addressSpace)
- Specified by:
getAuthorizationEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTokenEndpointURI
public java.net.URI getTokenEndpointURI()
- Specified by:
getTokenEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTokenEndpointURI
public java.net.URI getTokenEndpointURI(NamedAddressSpace addressSpace)
- Specified by:
getTokenEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getIdentityResolverEndpointURI
public java.net.URI getIdentityResolverEndpointURI()
- Specified by:
getIdentityResolverEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getIdentityResolverEndpointURI
public java.net.URI getIdentityResolverEndpointURI(NamedAddressSpace addressSpace)
- Specified by:
getIdentityResolverEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getPostLogoutURI
public java.net.URI getPostLogoutURI()
- Specified by:
getPostLogoutURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTokenEndpointNeedsAuth
public boolean getTokenEndpointNeedsAuth()
- Specified by:
getTokenEndpointNeedsAuth
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getIdentityResolverType
public java.lang.String getIdentityResolverType()
- Specified by:
getIdentityResolverType
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getClientId
public java.lang.String getClientId()
- Specified by:
getClientId
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getClientSecret
public java.lang.String getClientSecret()
- Specified by:
getClientSecret
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTrustStore
public TrustStore getTrustStore()
- Specified by:
getTrustStore
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getScope
public java.lang.String getScope()
- Specified by:
getScope
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getDefaultAuthorizationEndpointURI
public java.net.URI getDefaultAuthorizationEndpointURI()
- Specified by:
getDefaultAuthorizationEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getDefaultTokenEndpointURI
public java.net.URI getDefaultTokenEndpointURI()
- Specified by:
getDefaultTokenEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getDefaultIdentityResolverEndpointURI
public java.net.URI getDefaultIdentityResolverEndpointURI()
- Specified by:
getDefaultIdentityResolverEndpointURI
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getDefaultScope
public java.lang.String getDefaultScope()
- Specified by:
getDefaultScope
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTlsProtocolAllowList
public java.util.List<java.lang.String> getTlsProtocolAllowList()
- Specified by:
getTlsProtocolAllowList
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTlsProtocolDenyList
public java.util.List<java.lang.String> getTlsProtocolDenyList()
- Specified by:
getTlsProtocolDenyList
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTlsCipherSuiteAllowList
public java.util.List<java.lang.String> getTlsCipherSuiteAllowList()
- Specified by:
getTlsCipherSuiteAllowList
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getTlsCipherSuiteDenyList
public java.util.List<java.lang.String> getTlsCipherSuiteDenyList()
- Specified by:
getTlsCipherSuiteDenyList
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getConnectTimeout
public int getConnectTimeout()
- Specified by:
getConnectTimeout
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
getReadTimeout
public int getReadTimeout()
- Specified by:
getReadTimeout
in interfaceOAuth2AuthenticationProvider<OAuth2AuthenticationProviderImpl>
-
validIdentityResolvers
public static java.util.Collection<java.lang.String> validIdentityResolvers()
-
-