@@ -12,16 +12,17 @@ abstract class SwitcherConfig {
1212
1313 protected boolean local ;
1414 protected boolean check ;
15- protected boolean autoRefreshToken ;
1615 protected String silent ;
1716 protected Integer timeout ;
1817 protected Integer regexTimeout ;
1918 protected Integer poolSize ;
19+ protected AuthConfig auth ;
2020 protected RelayConfig relay ;
2121 protected SnapshotConfig snapshot ;
2222 protected TruststoreConfig truststore ;
2323
2424 SwitcherConfig () {
25+ this .auth = new AuthConfig ();
2526 this .relay = new RelayConfig ();
2627 this .snapshot = new SnapshotConfig ();
2728 this .truststore = new TruststoreConfig ();
@@ -40,11 +41,14 @@ protected void updateSwitcherConfig(SwitcherProperties properties) {
4041 setEnvironment (properties .getValue (ContextKey .ENVIRONMENT ));
4142 setLocal (properties .getBoolean (ContextKey .LOCAL_MODE ));
4243 setCheck (properties .getBoolean (ContextKey .CHECK_SWITCHERS ));
43- setAutoRefreshToken (properties .getBoolean (ContextKey .AUTO_REFRESH_TOKEN ));
4444 setSilent (properties .getValue (ContextKey .SILENT_MODE ));
4545 setTimeout (properties .getInt (ContextKey .TIMEOUT_MS ));
4646 setPoolSize (properties .getInt (ContextKey .POOL_CONNECTION_SIZE ));
4747
48+ AuthConfig authConfig = new AuthConfig ();
49+ authConfig .setAutoRefresh (properties .getBoolean (ContextKey .AUTH_AUTO_REFRESH ));
50+ setAuth (authConfig );
51+
4852 RelayConfig relayConfig = new RelayConfig ();
4953 relayConfig .setRestrict (properties .getBoolean (ContextKey .RESTRICT_RELAY ));
5054 setRelay (relayConfig );
@@ -108,8 +112,8 @@ public void setCheck(boolean check) {
108112 this .check = check ;
109113 }
110114
111- public void setAutoRefreshToken ( boolean autoRefreshToken ) {
112- this .autoRefreshToken = autoRefreshToken ;
115+ public void setAuth ( AuthConfig auth ) {
116+ this .auth = auth ;
113117 }
114118
115119 public void setSilent (String silent ) {
@@ -139,6 +143,18 @@ public void setTruststore(TruststoreConfig truststore) {
139143 this .truststore = truststore ;
140144 }
141145
146+ public static class AuthConfig {
147+ private boolean autoRefresh ;
148+
149+ public boolean isAutoRefresh () {
150+ return autoRefresh ;
151+ }
152+
153+ public void setAutoRefresh (boolean autoRefresh ) {
154+ this .autoRefresh = autoRefresh ;
155+ }
156+ }
157+
142158 public static class RelayConfig {
143159 private boolean restrict ;
144160
0 commit comments