Commit 5c0ef308 authored by Dave Syer's avatar Dave Syer

Test that client-id can be hyphen or camel-cased

parent 954d1372
......@@ -115,7 +115,7 @@ public class OAuth2ResourceServerConfiguration {
RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(environment,
"security.oauth2.resource.");
String client = environment
.resolvePlaceholders("${security.oauth2.client.clientId:}");
.resolvePlaceholders("${security.oauth2.client.client-id:}");
if (StringUtils.hasText(client)) {
return ConditionOutcome.match("found client id");
}
......
......@@ -21,7 +21,6 @@ import java.util.Map;
import org.junit.After;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
......@@ -122,9 +121,9 @@ public class ResourceServerTokenServicesConfigurationTests {
}
@Test
public void userInfoNoClient() {
public void userInfoWithClient() {
EnvironmentTestUtils.addEnvironment(this.environment,
"security.oauth2.client.clientId=acme",
"security.oauth2.client.client-id=acme",
"security.oauth2.resource.userInfoUri:http://example.com",
"server.port=-1", "debug=true");
this.context = new SpringApplicationBuilder(ResourceNoClientConfiguration.class)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment