Package io.jmix.core.impl.method
Class UserArgumentResolver
java.lang.Object
io.jmix.core.impl.method.TypedArgumentResolver<org.springframework.security.core.userdetails.UserDetails>
io.jmix.core.impl.method.UserArgumentResolver
- All Implemented Interfaces:
MethodArgumentResolver
@Component("core_UserArgumentResolver")
public class UserArgumentResolver
extends TypedArgumentResolver<org.springframework.security.core.userdetails.UserDetails>
Allows resolving the current authorized
UserDetails
as method argument.-
Field Summary
Fields inherited from class io.jmix.core.impl.method.TypedArgumentResolver
paramClass
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetails
resolveArgument
(org.springframework.core.MethodParameter parameter) Resolves a method parameter into an argument value.Methods inherited from class io.jmix.core.impl.method.TypedArgumentResolver
supportsParameter
-
Field Details
-
currentAuthentication
-
-
Constructor Details
-
UserArgumentResolver
public UserArgumentResolver()
-
-
Method Details
-
resolveArgument
public org.springframework.security.core.userdetails.UserDetails resolveArgument(org.springframework.core.MethodParameter parameter) Description copied from interface:MethodArgumentResolver
Resolves a method parameter into an argument value.- Specified by:
resolveArgument
in interfaceMethodArgumentResolver
- Specified by:
resolveArgument
in classTypedArgumentResolver<org.springframework.security.core.userdetails.UserDetails>
- Parameters:
parameter
- the method parameter to resolve. This parameter must have previously been passed toMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)
which must have returnedtrue
.- Returns:
- the resolved argument value, or
null
if not resolvable
-