Bläddra i källkod

更新认证服务器配置

mrbird 6 år sedan
förälder
incheckning
b8867f6ff6

+ 3 - 1
febs-auth/src/main/java/cc/mrbird/febs/auth/configure/FebsAuthorizationServerConfigure.java

@@ -61,10 +61,12 @@ public class FebsAuthorizationServerConfigure extends AuthorizationServerConfigu
     @SuppressWarnings("unchecked")
     public void configure(AuthorizationServerEndpointsConfigurer endpoints) {
         endpoints.tokenStore(tokenStore())
-                .accessTokenConverter(jwtAccessTokenConverter())
                 .userDetailsService(userDetailService)
                 .authenticationManager(authenticationManager)
                 .exceptionTranslator(exceptionTranslator);
+        if (properties.getEnableJwt()) {
+            endpoints.accessTokenConverter(jwtAccessTokenConverter());
+        }
     }
 
     @Bean