Class WebAuthnErrorMessageLookupFunction
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
net.shibboleth.idp.plugin.authn.webauthn.context.navigate.WebAuthnErrorMessageLookupFunction
- All Implemented Interfaces:
Function<ProfileRequestContext,,String> ContextDataLookupFunction<ProfileRequestContext,,String> Aware,ApplicationContextAware
public class WebAuthnErrorMessageLookupFunction
extends ApplicationObjectSupport
implements ContextDataLookupFunction<ProfileRequestContext,String>
A function that examines the state of a request and produces an appropriate message for WebAuthn flow views.
NOTE: The result of this function is NOT HTML-encoded in any way and must be encoded for safety if used.
-
Field Summary
FieldsFields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ProfileRequestContext input) private StringgetClassifiedMessage(MessageSourceAccessor messageSource, String classifiedError) Get classified message.voidSets whether non-message-based error messages should be exposed or turned into a more generic value.Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContext
-
Field Details
-
genericMessageID
Message ID to use for generic messages.
-
-
Constructor Details
-
WebAuthnErrorMessageLookupFunction
public WebAuthnErrorMessageLookupFunction()
-
-
Method Details
-
setGenericMessageID
Sets whether non-message-based error messages should be exposed or turned into a more generic value.- Parameters:
id- message ID
-
apply
- Specified by:
applyin interfaceFunction<ProfileRequestContext,String>
-
getClassifiedMessage
@Nullable private String getClassifiedMessage(@Nonnull MessageSourceAccessor messageSource, @Nonnull String classifiedError) Get classified message.- Parameters:
messageSource- Spring message sourceclassifiedError- classified error event- Returns:
- mapped message, or null
-