org.zodiac.boot.resolver.ReactiveTokenArgumentResolver Maven / Gradle / Ivy
The newest version!
package org.zodiac.boot.resolver;
import org.springframework.core.MethodParameter;
import org.springframework.web.reactive.BindingContext;
import org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver;
import org.springframework.web.server.ServerWebExchange;
import org.zodiac.security.auth.model.SecurityPlatformUser;
import org.zodiac.security.util.SecurityReactiveAuthUtil;
import reactor.core.publisher.Mono;
/**
* Token转化SecurityPlatformUser。
*
*/
public class ReactiveTokenArgumentResolver implements HandlerMethodArgumentResolver {
public ReactiveTokenArgumentResolver() {
}
@Override
public boolean supportsParameter(MethodParameter parameter) {
return parameter.getParameterType().equals(SecurityPlatformUser.class);
}
@Override
public Mono