spring cloud security oauth2自定义参数认证源码配置
1、继承UsernamePasswordAuthenticationToken,自定义接收参数 package com.mx.octoo.auth.authentication ; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken ; import org.springframework.security.core.GrantedAuthority ; import java.util.Collection ; public class TenantAuthenticationToken extends UsernamePasswordAuthenticationToken { private static final long serialVersionUID = 8217066478491458584L ; private final String tenantCode ; // ~ Constructors // =================================================================================================== /** * This constructor