-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Do you have an awesome idea to improve the project? Please describe.
Adding authentication information into the body map should be possible BEFORE body
processing, so that the authorizer can reject a request even BEFORE the body is parsed.
Is your feature request related to a problem? Please describe.
That reduces the attack surface and hence increases security.
Describe the solution you'd like
I'd like to be able to call:
.configured(toAuthenticateRequests().beforeBodyProcessing().using(metaData -> {
final Optional<CustomerIdentifier> optionalId = metaData.get(HEADERS)
.getHeader("Authorization")
.map(authenticator::authenticateAs);
optionalId.ifPresent(customerIdentifier ->
metaData.get(BODY_MAP).put("customerIdentifier", customerIdentifier)
);
return optionalId;
}))
without receiving a java.lang.RuntimeException: Could not find meta datum BODY_MAP ...
Additional context
none given
Metadata
Metadata
Assignees
Labels
No labels