Class DefaultDuoOIDCIntegration
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.plugin.authn.duo.DefaultDuoOIDCIntegration
-
- All Implemented Interfaces:
net.shibboleth.idp.authn.principal.PrincipalSupportingComponent,DuoOIDCIntegration,Component,DestructableComponent,InitializableComponent
@ThreadSafeAfterInit public class DefaultDuoOIDCIntegration extends AbstractInitializableComponent implements DuoOIDCIntegration
Wrapper for use with Duo OIDC integrations. Class is an initializable component and is hence made effectively immutable once initialized.
-
-
Field Summary
Fields Modifier and Type Field Description private StringapiHostAPI host.private StringauthorizeEndpointThe URL path to the authorization endpoint.private StringclientIdIntegration key.private StringhealthEndpointThe URL path to the health endpoint.private StringredirectURIThe redirect_uri to send the client after authorisation .private StringsecretKeySecret key.private SubjectsupportedPrincipalsContainer for supported principals.private StringtokenEndpointThe URL path to the token endpoint.
-
Constructor Summary
Constructors Constructor Description DefaultDuoOIDCIntegration()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()booleanequals(Object obj)StringgetAPIHost()Get the name of the API host to contact.StringgetAuthorizeEndpoint()Get the path of the authorization endpoint.StringgetClientId()Get the clientId key.StringgetHealthCheckEndpoint()Get the path of the health check endpoint.StringgetRedirectURI()Get the redirect_uri to direct the client to after authorisation.StringgetSecretKey()Get the secret key.<T extends Principal>
Set<T>getSupportedPrincipals(Class<T> c)StringgetTokenEndpoint()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 uri)Set the redirect_uri to use.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.StringtoString()-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
apiHost
@NonnullAfterInit @NotEmpty private String apiHost
API host.
-
clientId
@NonnullAfterInit @NotEmpty private String clientId
Integration key.
-
secretKey
@NonnullAfterInit @NotEmpty private String secretKey
Secret key.
-
redirectURI
@NonnullAfterInit @NotEmpty private String redirectURI
The redirect_uri to send the client after authorisation .
-
healthEndpoint
@NonnullAfterInit @NotEmpty private String healthEndpoint
The URL path to the health endpoint.
-
authorizeEndpoint
@NonnullAfterInit @NotEmpty private String authorizeEndpoint
The URL path to the authorization endpoint.
-
tokenEndpoint
@NonnullAfterInit @NotEmpty private String tokenEndpoint
The URL path to the token endpoint.
-
supportedPrincipals
@Nonnull private final Subject supportedPrincipals
Container for supported principals.
-
-
Method Detail
-
getAPIHost
@Nonnull @NotEmpty public String getAPIHost()
Get the name of the API host to contact.- Specified by:
getAPIHostin interfaceDuoOIDCIntegration- Returns:
- name of API host
-
getHealthCheckEndpoint
@Nonnull @NotEmpty public String 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
public void setHealthCheckEndpoint(@Nonnull @NotEmpty String endpoint)
Set the health check endpoint URL path.- Parameters:
endpoint- the endpoint.
-
getAuthorizeEndpoint
@Nonnull @NotEmpty public String getAuthorizeEndpoint()
Description copied from interface:DuoOIDCIntegrationGet the path of the authorization endpoint.- Specified by:
getAuthorizeEndpointin interfaceDuoOIDCIntegration- Returns:
- the path of the authorization endpoint
-
setAuthorizeEndpoint
public void setAuthorizeEndpoint(@Nonnull @NotEmpty String endpoint)
Set the authorize endpoint URL path.- Parameters:
endpoint- the endpoint.
-
getTokenEndpoint
@Nonnull @NotEmpty public String getTokenEndpoint()
Description copied from interface:DuoOIDCIntegrationGet the path of the token endpoint.- Specified by:
getTokenEndpointin interfaceDuoOIDCIntegration- Returns:
- the path of the token endpoint;
-
setTokenEndpoint
public void setTokenEndpoint(@Nonnull @NotEmpty String endpoint)
Set the token endpoint URL path.- Parameters:
endpoint- the endpoint.
-
setAPIHost
public void setAPIHost(@Nonnull @NotEmpty String host)
Set the API host to use.- Parameters:
host- API host
-
setRedirectURI
public void setRedirectURI(@Nonnull @NotEmpty String uri)
Set the redirect_uri to use.- Parameters:
uri- the redirect_uri
-
getRedirectURI
@Nonnull @NotEmpty public String getRedirectURI()
Get the redirect_uri to direct the client to after authorisation.- Specified by:
getRedirectURIin interfaceDuoOIDCIntegration- Returns:
- the redirect_uri
-
setClientId
public void setClientId(@Nonnull @NotEmpty String id)
Set the client ID to use.- Parameters:
id- the client identifier.
-
getClientId
@Nonnull @NotEmpty public String getClientId()
Get the clientId key.- Specified by:
getClientIdin interfaceDuoOIDCIntegration- Returns:
- the integration key
-
setSecretKey
public void setSecretKey(@Nonnull @NotEmpty String key)
Set the secret key to use.- Parameters:
key- secret key
-
getSecretKey
@Nonnull @NotEmpty public String getSecretKey()
Get 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 interfacenet.shibboleth.idp.authn.principal.PrincipalSupportingComponent
-
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
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
-