@ConfigProperty public void setAlias(String alias) { this.alias = alias; } }
protected void doBeanConfigure(Object bean, ReflectValued v, String keyPrefix, ConfigProperty a) { String defaultValue = null == a ? null : a.defaultValue(); if(null != a) { String[] keys = a.key(); if(keys.length == 0) { keys = a.value(); } if(keys.length > 0) { for(String key : keys) { if(doBeanConfigureByKey(bean, v, key(keyPrefix, key), defaultValue)) { break; } } return; } } if(doBeanConfigureByKey(bean, v, keyPrefix + v.getName(), defaultValue)) { return; } if(doBeanConfigureByKey(bean, v, keyPrefix + Strings.lowerHyphen(v.getName()), defaultValue)) { return; } if(doBeanConfigureByKey(bean, v, keyPrefix + Strings.lowerUnderscore(v.getName()), defaultValue)) { return; } }
protected Object resolveConfigProperty(BeanDefinitionBase bd, ConfigProperty p, String name, Class<?> type, Type genericType) { String keyPrefix = bd.getConfigurationPrefix(); if(!Strings.isEmpty(keyPrefix)) { char lastChar = keyPrefix.charAt(keyPrefix.length() - 1); if(Character.isLetter(lastChar) || Character.isDigit(lastChar)) { keyPrefix = keyPrefix + "."; } }else{ keyPrefix = ""; } if(p.value().length > 0) { for(String key : p.value()) { Object value = resolveConfigProperty(keyPrefix + key, type, genericType); if(null != value){ return value; } } }else{ Object value = resolveConfigProperty(keyPrefix + name, type, genericType); if(null != value) { return value; } value = resolveConfigProperty(keyPrefix + Strings.lowerHyphen(name), type, genericType); if(null != value) { return value; } } return null; }
@ConfigProperty public DefaultSecurityConfig setCrossContext(boolean crossContext) { this.crossContext = crossContext; return this; }
@ConfigProperty public SecurityConfigurator setLoginAction(String path) { this.loginAction = path; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setLoginTokenEnabled(boolean enabled) { this.loginTokenEnabled = enabled; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setDefaultAccessTokenExpires(int defaultExpiresIn) { this.defaultAccessTokenExpires = defaultExpiresIn; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setDefaultRefreshTokenExpires(int seconds) { this.defaultRefreshTokenExpires = seconds; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setDefaultAuthorizationCodeExpires(int seconds) { this.defaultAuthorizationCodeExpires = seconds; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setDefaultLoginSessionExpires(int seconds){ this.defaultLoginSessionExpires = seconds; return this; }
@ConfigProperty @Override public OAuth2ResServerConfigurator setRsaPublicKeyStr(String publicKey) { this.rsaPublicKeyStr = publicKey; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setEnabled(boolean enabled) { this.enabled = enabled; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setAuthorizationCodeEnabled(boolean authorazationCodeEnabled) { this.authorizationCodeEnabled = authorazationCodeEnabled; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setClientCredentialsEnabled(boolean clientCredentialsEnabled) { this.clientCredentialsEnabled = clientCredentialsEnabled; return this; } @ConfigProperty
@ConfigProperty public OAuth2AuthzServerConfigurator setLogoutEndpointPath(String path) { this.logoutEndpointPath = path; return this; }
@ConfigProperty public OAuth2AuthzServerConfigurator setLoginView(String view) { this.loginView = view; return this; }
@ConfigProperty public OAuth2WebAppConfigurator setEnabled(boolean enabled) { this.enabled = enabled; this.oauth2LoginEnabled = enabled; this.oauth2LogoutEnabled = enabled; return this; }
@ConfigProperty public OAuth2WebAppConfigurator setClientSecret(String clientSecret) { this.clientSecret = clientSecret; return this; }
@ConfigProperty public OAuth2WebAppConfigurator setClientLogoutUri(String uri) { this.clientLogoutUri = uri; return this; }
@ConfigProperty public OAuth2WebAppConfigurator setErrorView(String errorView) { this.errorView = errorView; return this; }