Class SimpleDuoOIDCIntegration
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.plugin.authn.duo.SimpleDuoOIDCIntegration
- All Implemented Interfaces:
PrincipalSupportingComponent,DuoOIDCIntegration,Component,DestructableComponent,InitializableComponent
@ThreadSafe
public final class SimpleDuoOIDCIntegration
extends AbstractInitializableComponent
implements DuoOIDCIntegration
A data wrapper for use with Duo OIDC integrations which does not support redirectURI generation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringAPI host.private StringThe URL path to the authorization endpoint.private StringIntegration key.private StringThe URL path to the health endpoint.private final org.slf4j.LoggerClass logger.private StringThe used (by clients) redirect_uri to send the client after authorisation .private StringSecret key.private final SubjectContainer for supported principals.private StringThe URL path to the token endpoint. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleanGet the name of the API host to contact.Get the path of the authorization endpoint.Get the clientId key.Get the path of the health check endpoint.Get the runtime redirectURI to direct the client to after authorisation.Get the secret key.getSupportedPrincipals(Class<T> c) Get the path of the token endpoint.inthashCode()voidsetAPIHost(String host) Set the API host to use.voidsetAuthorizeEndpoint(String endpoint) Set the authorize endpoint URL path.voidsetClientId(String id) Set the client ID to use.voidsetHealthCheckEndpoint(String endpoint) Set the health check endpoint URL path.voidsetRedirectURI(String url) Set the redirect URI.voidsetSecretKey(String key) Set the secret key to use.<T extends Principal>
voidsetSupportedPrincipals(Collection<T> principals) Set supported non-user-specific principals that the action will include in the subjects it generates, in place of any default principals from the flow.voidsetTokenEndpoint(String endpoint) Set the token endpoint URL path.toString()Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
apiHost
API host. -
clientId
Integration key. -
secretKey
Secret key. -
redirectURI
The used (by clients) redirect_uri to send the client after authorisation . -
healthEndpoint
The URL path to the health endpoint. -
authorizeEndpoint
The URL path to the authorization endpoint. -
tokenEndpoint
The URL path to the token endpoint. -
supportedPrincipals
Container for supported principals.
-
-
Constructor Details
-
SimpleDuoOIDCIntegration
public SimpleDuoOIDCIntegration()Constructor.
-
-
Method Details
-
getAPIHost
Description copied from interface:DuoOIDCIntegrationGet the name of the API host to contact.- Specified by:
getAPIHostin interfaceDuoOIDCIntegration- Returns:
- name of API host
-
setAPIHost
Set the API host to use.- Parameters:
host- API host
-
getHealthCheckEndpoint
Description copied from interface:DuoOIDCIntegrationGet the path of the health check endpoint.- Specified by:
getHealthCheckEndpointin interfaceDuoOIDCIntegration- Returns:
- the path of the health check endpoint
-
setHealthCheckEndpoint
Set the health check endpoint URL path.- Parameters:
endpoint- the endpoint.
-
getAuthorizeEndpoint
Description copied from interface:DuoOIDCIntegrationGet the path of the authorization endpoint.- Specified by:
getAuthorizeEndpointin interfaceDuoOIDCIntegration- Returns:
- the path of the authorization endpoint
-
setAuthorizeEndpoint
Set the authorize endpoint URL path.- Parameters:
endpoint- the endpoint.
-
getTokenEndpoint
Description copied from interface:DuoOIDCIntegrationGet the path of the token endpoint.- Specified by:
getTokenEndpointin interfaceDuoOIDCIntegration- Returns:
- the path of the token endpoint;
-
setTokenEndpoint
Set the token endpoint URL path.- Parameters:
endpoint- the endpoint.
-
getRedirectURI
Description copied from interface:DuoOIDCIntegrationGet the runtime redirectURI to direct the client to after authorisation.- Specified by:
getRedirectURIin interfaceDuoOIDCIntegration- Returns:
- the redirectURI
-
setRedirectURI
Set the redirect URI.- Parameters:
url- the url.
-
setClientId
Set the client ID to use.- Parameters:
id- the client identifier.
-
getClientId
Description copied from interface:DuoOIDCIntegrationGet the clientId key.- Specified by:
getClientIdin interfaceDuoOIDCIntegration- Returns:
- the integration key
-
setSecretKey
Set the secret key to use.- Parameters:
key- secret key
-
getSecretKey
Description copied from interface:DuoOIDCIntegrationGet the secret key.- Specified by:
getSecretKeyin interfaceDuoOIDCIntegration- Returns:
- the secret key
-
getSupportedPrincipals
@Nonnull @NonnullElements @Unmodifiable public <T extends Principal> Set<T> getSupportedPrincipals(@Nonnull Class<T> c) - Specified by:
getSupportedPrincipalsin interfacePrincipalSupportingComponent
-
setSupportedPrincipals
public <T extends Principal> void setSupportedPrincipals(@Nullable @NonnullElements Collection<T> principals) Set supported non-user-specific principals that the action will include in the subjects it generates, in place of any default principals from the flow.Setting to a null or empty collection will maintain the default behavior of relying on the flow.
- Type Parameters:
T- a type of principal to add, if not generic- Parameters:
principals- supported principals to include
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
hashCode
public int hashCode() -
equals
-
toString
-