Module io.inverno.mod.security
Package io.inverno.mod.security.identity
Interface IdentityResolver<A extends Authentication,B extends Identity>
- Type Parameters:
A
- the type of authenthenticationB
- the type of identity
- All Known Implementing Classes:
LDAPIdentityResolver
,UserIdentityResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An identity resolver is used to resolve the identity of an authenticated entity from an Authentication
.
An authentication basically identifies an authenticated entity in an application, it basically proves that the credentials of an entity have been authenticated, an identity resolver resolves the identity of the authenticated user.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends Identity>
IdentityResolver<A, T> Invokes this identity resolver and then transforms the resulting identity publisher.default <T extends Identity>
IdentityResolver<A, T> Invokes this identity resolver and then transforms the resulting identity.resolveIdentity
(A authentication) Resolves the identity of the authenticated entity from the specified authentication.
-
Method Details
-
resolveIdentity
Resolves the identity of the authenticated entity from the specified authentication.
- Parameters:
authentication
- an authentication- Returns:
- a mono emitting the resolved identity or an empty mono if no identity could have been resolved
- Throws:
IdentityException
- of there was an error resolving the identity
-
flatMap
default <T extends Identity> IdentityResolver<A,T> flatMap(Function<? super B, ? extends Mono<? extends T>> mapper) Invokes this identity resolver and then transforms the resulting identity publisher.
- Type Parameters:
T
- the type of the resulting identity- Parameters:
mapper
- the function to transform the identity publisher- Returns:
- a transformed identity resolver
-
map
Invokes this identity resolver and then transforms the resulting identity.
- Type Parameters:
T
- the type of the resulting identity- Parameters:
mapper
- the function to transform the identity- Returns:
- a transformed identity resolver
-