Class DuoAuthenticationLifetimeLookupStrategy
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.authn.duo.DuoAuthenticationLifetimeLookupStrategy
- All Implemented Interfaces:
Function<ProfileRequestContext,,Duration> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class DuoAuthenticationLifetimeLookupStrategy
extends AbstractIdentifiableInitializableComponent
implements Function<ProfileRequestContext,Duration>
An authentication lifetime lookup strategy that uses different lookup strategies depending on whether a 'fresh'
authentication has been requested or not. That is, it determines, indirectly, how long a Duo authentication should
be considered valid.
A null value from a lookup strategy is passed back to the caller as null. A
null value should be interpreted as, do not enforce authentication lifetime.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,Duration> Lookup strategy to find the amount of time for which the auth_time inside a token is valid for.private final org.slf4j.LoggerClass logger.private Function<ProfileRequestContext,Duration> Lookup strategy to find the amount of time for which the auth_time inside a token is valid for when a 'fresh' authentication is requested. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAuthnLifetime(Duration lifetime) Sets the amount of time for which the auth_time inside a token is valid for.voidSet the Lookup strategy to find the amount of time for which the auth_time inside a token is valid for.voidsetReauthnLifetime(Duration lifetime) Sets the amount of time for which the auth_time inside a token is valid for.voidSet the Lookup strategy to find the amount of time for which the auth_time inside a token is valid for.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
authnLifetimeLookupStrategy
Lookup strategy to find the amount of time for which the auth_time inside a token is valid for. -
reauthnLifetimeLookupStrategy
Lookup strategy to find the amount of time for which the auth_time inside a token is valid for when a 'fresh' authentication is requested.
-
-
Constructor Details
-
DuoAuthenticationLifetimeLookupStrategy
public DuoAuthenticationLifetimeLookupStrategy()Constructor.
-
-
Method Details
-
setReauthnLifetime
Sets the amount of time for which the auth_time inside a token is valid for. That is, the time from which the end-user interactively authenticated. This only applies to requests that require a fresh authentication e.g. using forcedAuthn or max_age=0.- Parameters:
lifetime- amount of time for which the auth_time inside a token is valid for. Can benullif a lifetime should not be enforced.
-
setReauthnLifetimeLookupStrategy
public void setReauthnLifetimeLookupStrategy(@Nonnull Function<ProfileRequestContext, Duration> strategy) Set the Lookup strategy to find the amount of time for which the auth_time inside a token is valid for. That is, the time from which the end-user interactively authenticated. This only applies to requests that require a fresh authentication e.g. using forcedAuthn or max_age=0.- Parameters:
strategy- the strategy. Can returnnullif a lifetime should not be enforced.
-
setAuthnLifetime
Sets the amount of time for which the auth_time inside a token is valid for. That is, the time from which the end-user interactively authenticated. This only applies to requests that do not require a fresh authentication.- Parameters:
lifetime- amount of time for which the auth_time inside a token is valid for. Can benullif a lifetime should not be enforced.
-
setAuthnLifetimeLookupStrategy
public void setAuthnLifetimeLookupStrategy(@Nonnull Function<ProfileRequestContext, Duration> strategy) Set the Lookup strategy to find the amount of time for which the auth_time inside a token is valid for. That is, the time from which the end-user interactively authenticated. This only applies to requests that do not require a fresh authentication.- Parameters:
strategy- the strategy. Can returnnullif a lifetime should not be enforced.
-
apply
- Specified by:
applyin interfaceFunction<ProfileRequestContext,Duration>
-