Class UsernameLookupFromHttpRequest
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.authn.webauthn.context.navigate.UsernameLookupFromHttpRequest
- All Implemented Interfaces:
Function<ProfileRequestContext,,String> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
@ThreadSafeAfterInit
public class UsernameLookupFromHttpRequest
extends AbstractIdentifiableInitializableComponent
implements Function<ProfileRequestContext,String>
Extract a username from the HTTP request, returning
null if not found.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NonnullSupplier<HttpServletRequest>Supplier for the Current HTTP request, if available.private StringForm parameter name to carry username. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the current HTTP request if available.voidsetHttpServletRequestSupplier(NonnullSupplier<HttpServletRequest> requestSupplier) Set the current HTTP request Supplier.voidsetUsernameFieldName(String name) Sets the name of the form field to carry the username.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
-
usernameFieldName
Form parameter name to carry username. -
httpServletRequestSupplier
Supplier for the Current HTTP request, if available.
-
-
Constructor Details
-
UsernameLookupFromHttpRequest
public UsernameLookupFromHttpRequest()Constructor.
-
-
Method Details
-
getHttpServletRequest
Get the current HTTP request if available.- Returns:
- current HTTP request
-
setUsernameFieldName
Sets the name of the form field to carry the username.- Parameters:
name- field name
-
apply
- Specified by:
applyin interfaceFunction<ProfileRequestContext,String>
-