@ConfigProperty public void setAlias(String alias) { this.alias = alias; } }
@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 setClientSecret(String clientSecret) { this.clientSecret = clientSecret; return this; }
@ConfigProperty public OAuth2WebAppConfigurator setClientLogoutUri(String uri) { this.clientLogoutUri = uri; return this; }
@ConfigProperty public DefaultSecurityConfig setLogoutSuccessUrl(String url) { Args.notEmpty(url); this.logoutSuccessUrl = url; return this; }
@ConfigProperty public void setDirectServerUrl(String directServerUrl) {//don't change the parameter name (used by config property) directServerUrl = Paths.suffixWithoutSlash(directServerUrl); this.tokenUrl = directServerUrl + "/oauth2/token"; this.tokenInfoUrl = directServerUrl + "/oauth2/tokeninfo"; this.userInfoUrl = directServerUrl + "/oauth2/userinfo"; this.publicKeyUrl = directServerUrl + "/oauth2/publickey"; }
@ConfigProperty public OAuth2WebAppConfigurator setClientRedirectUri(String uri) { this.clientRedirectUri = Paths.suffixWithoutSlash(uri); return this; }
@ConfigProperty public void setPublicKeyStr(String publicKey) { if(Strings.isEmpty(publicKey)) { this.publicKey = null; }else{ this.publicKey = RSA.decodePublicKey(publicKey); } }