Module io.inverno.mod.security.http
Package io.inverno.mod.security.http
Interface CredentialsExtractor<A extends Credentials>
- Type Parameters:
A
- the credentials type
- All Known Implementing Classes:
BasicCredentialsExtractor
,BearerTokenCredentialsExtractor
,CookieTokenCredentialsExtractor
,DigestCredentialsExtractor
,FormCredentialsExtractor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A credentials extractor is used to extract credentials from an exchange, typically the request.
The SecurityInterceptor
uses it to extract credentials in order to authenticate the exchange and create the security context.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionExtracts credentials from the specified exchange.default CredentialsExtractor
<A> or
(CredentialsExtractor<? extends A> other) Returns a composed credentials extractor which first invokes this extractor and, if no credentials could have been extracted, invokes the specified extractor.
-
Method Details
-
extract
Extracts credentials from the specified exchange.
- Parameters:
exchange
- the exchange- Returns:
- a mono emitting the credentials or an empty mono if the exchange didn't provide any credentials
- Throws:
MalformedCredentialsException
- if credentials in the exchange are malformed
-
or
Returns a composed credentials extractor which first invokes this extractor and, if no credentials could have been extracted, invokes the specified extractor.
- Parameters:
other
- the credentials extractor to invoke in case this extractor was not able to extract credentials- Returns:
- a composed credentials extractor
-