@@ -27,11 +27,8 @@ public class AuthServerConfig extends AuthorizationServerConfigurerAdapter {
27
27
private final TokenStore tokenStore ;
28
28
private final int accessTokenValiditySeconds ;
29
29
private final int refreshTokenValiditySeconds ;
30
-
31
- @ Value ("${application.oauth.client.id}" )
32
- private String clientId ;
33
- @ Value ("${application.oauth.client.secret}" )
34
- private String clientSecret ;
30
+ private final String clientId ;
31
+ private final String clientSecret ;
35
32
36
33
@ Autowired
37
34
public AuthServerConfig (PasswordEncoder passwordEncoder ,
@@ -40,7 +37,9 @@ public AuthServerConfig(PasswordEncoder passwordEncoder,
40
37
AuthenticationManager authenticationManager ,
41
38
@ Qualifier ("authTokenStore" ) TokenStore tokenStore ,
42
39
@ Value ("${application.jwt.access-token.validity-seconds:3600}" ) int accessTokenValiditySeconds ,
43
- @ Value ("${application.jwt.refresh-token.validity-seconds:7200}" ) int refreshTokenValiditySeconds ) {
40
+ @ Value ("${application.jwt.refresh-token.validity-seconds:7200}" ) int refreshTokenValiditySeconds ,
41
+ @ Value ("${application.oauth.client.id}" ) String clientId ,
42
+ @ Value ("${application.oauth.client.secret}" ) String clientSecret ) {
44
43
super ();
45
44
this .passwordEncoder = passwordEncoder ;
46
45
this .jwtAccessTokenConverter = jwtAccessTokenConverter ;
@@ -49,6 +48,8 @@ public AuthServerConfig(PasswordEncoder passwordEncoder,
49
48
this .tokenStore = tokenStore ;
50
49
this .accessTokenValiditySeconds = accessTokenValiditySeconds ;
51
50
this .refreshTokenValiditySeconds = refreshTokenValiditySeconds ;
51
+ this .clientId = clientId ;
52
+ this .clientSecret = clientSecret ;
52
53
}
53
54
54
55
@ Override
0 commit comments