Interface AuthenticationInfo
- All Known Implementing Classes:
BasicAuthenticationInfo,JwtTokenAuthenticationInfo,JwtTokenWithForwardJwtAuthenticationInfo
public interface AuthenticationInfo
The
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.-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends AuthenticationInfo>
TCan be used to cast theAuthenticationInfoto a specific implementation: -BasicAuthenticationInfo-JwtTokenAuthenticationInfo-JwtTokenWithForwardJwtAuthenticationInfodefault booleanis(Class<? extends AuthenticationInfo> clazz) Can be used to check if anAuthenticationInfois an instance of the commonAuthenticationInfoimplementations: -BasicAuthenticationInfo-JwtTokenAuthenticationInfo-JwtTokenWithForwardJwtAuthenticationInfo
-
Method Details
-
is
Can be used to check if anAuthenticationInfois an instance of the commonAuthenticationInfoimplementations: -BasicAuthenticationInfo-JwtTokenAuthenticationInfo-JwtTokenWithForwardJwtAuthenticationInfo- Parameters:
clazz- the class to check the instance against- Returns:
- true, if the
AuthenticationInfois of an instance ofclazz
-
as
Can be used to cast theAuthenticationInfoto a specific implementation: -BasicAuthenticationInfo-JwtTokenAuthenticationInfo-JwtTokenWithForwardJwtAuthenticationInfo- Type Parameters:
T- the type of the class- Parameters:
clazz- the class to cast the instance to- Returns:
- the instance casted to type
T
-