mapPrincipal
Returns a scheme that produces R by transforming every successfully resolved principal of type P.
The returned scheme reuses this scheme's provider and extension. If the original resolver returns null, the transformation is not invoked and authentication fails as before. If transform returns null, the scheme registers an AuthenticationFailedCause.InvalidCredentials challenge and rejects both required and optional authentication. Route-level and scheme-level onUnauthorized handlers receive that cause. When neither handler nor a provider challenge responds, authentication fails with 401 Unauthorized. Exceptions thrown by transform propagate.
Return
a scheme that produces R and reuses this scheme's provider and extension.
Parameters
maps a successfully resolved principal to R, or null to reject the credentials.
Type Parameters
the principal type produced by this scheme.
the principal type produced by transform.
the intrinsic extension context preserved on the returned scheme.