Class ManagePasswordlessCookie
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.plugin.authn.duo.admin.impl.ManagePasswordlessCookie
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Administrative management of passwordless cookie by end-user or administrator.
Incoming form fields are used to determine what to do and for whom, with admin manipulation of a cookie for a different identity based on a separate access policy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AccessControlServiceAccess control service.private PasswordlessCookieManagerCookie manager to use.private StringCurrently authenticated user.private final org.slf4j.LoggerClass logger.static final StringName of form field signalling the operation to perform.static final StringName of form field signalling username to operate with. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) private booleanisAdminAllowed(ProfileRequestContext profileRequestContext, String username) Tests whether an admin operation (on a different user than is accessing the flow) should be permitted.voidSetsAccessControlServiceto use for guarding admin access to cookie.voidSetsPasswordlessCookieManagerto use.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.InitializableComponent
initialize, isInitialized
-
Field Details
-
USERNAME_FIELD_NAME
Name of form field signalling username to operate with.- See Also:
-
OPERATION_FIELD_NAME
Name of form field signalling the operation to perform.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
accessControlService
Access control service. -
cookieManager
Cookie manager to use. -
currentUsername
Currently authenticated user.
-
-
Constructor Details
-
ManagePasswordlessCookie
public ManagePasswordlessCookie()
-
-
Method Details
-
setPasswordlessCookieManager
SetsPasswordlessCookieManagerto use.- Parameters:
manager- cookie manager
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
isAdminAllowed
private boolean isAdminAllowed(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull @NotEmpty String username) Tests whether an admin operation (on a different user than is accessing the flow) should be permitted.- Parameters:
profileRequestContext- profile request contextusername- username to operate on- Returns:
- true iff the operation should be permitted