org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration Java Examples

The following examples show how to use org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ResourceServerProperties.java    From spring-security-oauth2-boot with Apache License 2.0 6 votes vote down vote up
public void validate() {
	if (countBeans(AuthorizationServerEndpointsConfiguration.class) > 0) {
		// If we are an authorization server we don't need remote resource token
		// services
		return;
	}
	if (countBeans(ResourceServerTokenServicesConfiguration.class) == 0) {
		// If we are not a resource server or an SSO client we don't need remote
		// resource token services
		return;
	}
	if (!StringUtils.hasText(this.clientId)) {
		return;
	}
	try {
		doValidate();
	}
	catch (BindException ex) {
		throw new IllegalStateException(ex);
	}
}