Package io.jmix.authserver.principal
Class AuthServerAuthenticationPrincipalResolver
java.lang.Object
io.jmix.authserver.principal.AuthServerAuthenticationPrincipalResolver
- All Implemented Interfaces:
AuthenticationPrincipalResolver
public class AuthServerAuthenticationPrincipalResolver
extends Object
implements AuthenticationPrincipalResolver
A
AuthenticationPrincipalResolver
that makes the CurrentAuthentication.getUser()
method return an
instance of the actual user class (usually a JPA entity defined in the application) if authenticated using access
token.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveAuthenticationPrincipal
(org.springframework.security.core.Authentication authentication) Resolves a principal from the authenticationboolean
supports
(org.springframework.security.core.Authentication authentication) Checks if resolving strategy supports authentication from the current security context
-
Constructor Details
-
AuthServerAuthenticationPrincipalResolver
public AuthServerAuthenticationPrincipalResolver()
-
-
Method Details
-
supports
public boolean supports(org.springframework.security.core.Authentication authentication) Description copied from interface:AuthenticationPrincipalResolver
Checks if resolving strategy supports authentication from the current security context- Specified by:
supports
in interfaceAuthenticationPrincipalResolver
-
resolveAuthenticationPrincipal
public Object resolveAuthenticationPrincipal(org.springframework.security.core.Authentication authentication) Description copied from interface:AuthenticationPrincipalResolver
Resolves a principal from the authentication- Specified by:
resolveAuthenticationPrincipal
in interfaceAuthenticationPrincipalResolver
-