diff --git a/src/main/java/org/springframework/cloud/cloudfoundry/oauth2/ResourceServerProperties.java b/src/main/java/org/springframework/cloud/cloudfoundry/oauth2/ResourceServerProperties.java index 6649b59..e589cfa 100644 --- a/src/main/java/org/springframework/cloud/cloudfoundry/oauth2/ResourceServerProperties.java +++ b/src/main/java/org/springframework/cloud/cloudfoundry/oauth2/ResourceServerProperties.java @@ -68,7 +68,7 @@ public class ResourceServerProperties implements Validator { "Missing userInfoUri (no client secret available)"); } } else { - if (!StringUtils.hasText(resource.getTokenInfoUri())) { + if (isPreferTokenInfo() && !StringUtils.hasText(resource.getTokenInfoUri())) { errors.rejectValue("tokenInfoUri", "missing.tokenInfoUri", "Missing tokenInfoUri"); } diff --git a/src/main/java/org/springframework/cloud/cloudfoundry/sso/OAuth2SsoConfigurer.java b/src/main/java/org/springframework/cloud/cloudfoundry/sso/OAuth2SsoConfigurer.java index 262ee2e..07557dc 100644 --- a/src/main/java/org/springframework/cloud/cloudfoundry/sso/OAuth2SsoConfigurer.java +++ b/src/main/java/org/springframework/cloud/cloudfoundry/sso/OAuth2SsoConfigurer.java @@ -23,6 +23,6 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity; */ public interface OAuth2SsoConfigurer { - void configure(HttpSecurity http); + void configure(HttpSecurity http) throws Exception; }