Package net.shibboleth.idp.authn.duo
Class BasicDuoIntegration
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.authn.duo.BasicDuoIntegration
- All Implemented Interfaces:
DuoIntegration
,PrincipalSupportingComponent
,Component
,DestructableComponent
,InitializableComponent
Wrapper for use of Duo.
- Since:
- 3.3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Get the name of the API host to contact.Get the application key.Get the integration key.Get the secret key.getSupportedPrincipals
(Class<T> c) Get an immutable set of supported custom principals that the component produces, supports, contains, etc.void
setAPIHost
(String host) Set the API host to use.void
setApplicationKey
(String key) Set the application key to use.void
setIntegrationKey
(String key) Set the integration key to use.void
setSecretKey
(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.Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Field Details
-
apiHost
API host. -
applicationKey
Application key. -
integrationKey
Integration key. -
secretKey
Secret key. -
supportedPrincipals
Container for supported principals.
-
-
Constructor Details
-
BasicDuoIntegration
public BasicDuoIntegration()Constructor.
-
-
Method Details
-
getAPIHost
Get the name of the API host to contact.- Specified by:
getAPIHost
in interfaceDuoIntegration
- Returns:
- name of API host
-
setAPIHost
Set the API host to use.- Parameters:
host
- API host
-
getApplicationKey
Get the application key.- Specified by:
getApplicationKey
in interfaceDuoIntegration
- Returns:
- the application key
-
setApplicationKey
Set the application key to use.- Parameters:
key
- application key
-
getIntegrationKey
Get the integration key.- Specified by:
getIntegrationKey
in interfaceDuoIntegration
- Returns:
- the integration key
-
setIntegrationKey
Set the integration key to use.- Parameters:
key
- integration key
-
getSecretKey
Get the secret key.- Specified by:
getSecretKey
in interfaceDuoIntegration
- Returns:
- the secret key
-
setSecretKey
Set the secret key to use.- Parameters:
key
- secret key
-
getSupportedPrincipals
@Nonnull @NonnullElements @Unmodifiable public <T extends Principal> Set<T> getSupportedPrincipals(@Nonnull Class<T> c) Get an immutable set of supported custom principals that the component produces, supports, contains, etc.- Specified by:
getSupportedPrincipals
in interfacePrincipalSupportingComponent
- Type Parameters:
T
- type of Principal to inquire on- Parameters:
c
- type of Principal to inquire on- Returns:
- a set of matching principals
-
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:
doInitialize
in classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-