use of org.springframework.security.oauth2.provider.token.DefaultTokenServices in project spring-boot by spring-projects.
the class ResourceServerTokenServicesConfigurationTests method switchToJwt.
@Test
public void switchToJwt() {
EnvironmentTestUtils.addEnvironment(this.environment, "security.oauth2.resource.jwt.keyValue=FOOBAR");
this.context = new SpringApplicationBuilder(ResourceConfiguration.class).environment(this.environment).web(WebApplicationType.NONE).run();
DefaultTokenServices services = this.context.getBean(DefaultTokenServices.class);
assertThat(services).isNotNull();
this.thrown.expect(NoSuchBeanDefinitionException.class);
this.context.getBean(RemoteTokenServices.class);
}
Aggregations