Class UserIdentityResolver<A extends UserAuthentication<B>,B extends Identity>

java.lang.Object
io.inverno.mod.security.identity.UserIdentityResolver<A,B>
Type Parameters:
A - the type of user authenthentication
B - the type of identity
All Implemented Interfaces:
IdentityResolver<A,B>

public class UserIdentityResolver<A extends UserAuthentication<B>,B extends Identity> extends Object implements IdentityResolver<A,B>

Resolves an identity from a UserAuthentication.

A user authentication allows for authentication processes that might include both authentication and identification when applicable. This implementation simply extracts the identity already exposed by UserAuthentication.getIdentity().

Since:
1.5
Author:
Jeremy Kuhn
  • Constructor Details

    • UserIdentityResolver

      public UserIdentityResolver()
  • Method Details

    • resolveIdentity

      public reactor.core.publisher.Mono<B> resolveIdentity(A authentication) throws IdentityException
      Description copied from interface: IdentityResolver

      Resolves the identity of the authenticated entity from the specified authentication.

      Specified by:
      resolveIdentity in interface IdentityResolver<A extends UserAuthentication<B>,B extends Identity>
      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