public interface AuthenticationInfo
AuthenticationInfo
provides access to the authorization of the current request.
Usually UserInfoProvider
react on a specific AuthenticationInfo
implementations to extract user (principal) information from the authentication.
The AuthenticationInfo
can also be used to enable principal propagation of the current user in the request to a different service, as it provides access to the original authentication.Modifier and Type | Method and Description |
---|---|
default <T extends AuthenticationInfo> |
as(Class<T> clazz)
Can be used to cast the
AuthenticationInfo to a specific implementation:
- BasicAuthenticationInfo
- JwtTokenAuthenticationInfo
- JwtTokenWithForwardJwtAuthenticationInfo |
default boolean |
is(Class<? extends AuthenticationInfo> clazz)
Can be used to check if an
AuthenticationInfo is an instance of the common AuthenticationInfo implementations:
- BasicAuthenticationInfo
- JwtTokenAuthenticationInfo
- JwtTokenWithForwardJwtAuthenticationInfo |
default boolean is(Class<? extends AuthenticationInfo> clazz)
AuthenticationInfo
is an instance of the common AuthenticationInfo
implementations:
- BasicAuthenticationInfo
- JwtTokenAuthenticationInfo
- JwtTokenWithForwardJwtAuthenticationInfo
clazz
- the class to check the instance againstAuthenticationInfo
is of an instance of clazz
default <T extends AuthenticationInfo> T as(Class<T> clazz)
AuthenticationInfo
to a specific implementation:
- BasicAuthenticationInfo
- JwtTokenAuthenticationInfo
- JwtTokenWithForwardJwtAuthenticationInfo
T
- the type of the classclazz
- the class to cast the instance toT
Copyright © 2023. All rights reserved.