Add @transient to OAuth2IntrospectionAuthenticationToken
fixes gh-6829
This commit is contained in:
committed by
Josh Cummings
parent
e15922322e
commit
9fe8949883
@@ -564,6 +564,22 @@ public class OAuth2ResourceServerConfigurerTests {
|
||||
assertThat(result.getRequest().getSession(false)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requestWhenIntrospectionConfiguredThenSessionIsNotCreated()
|
||||
throws Exception {
|
||||
|
||||
this.spring.register(RestOperationsConfig.class, OpaqueTokenConfig.class, BasicController.class).autowire();
|
||||
mockRestOperations(json("Active"));
|
||||
|
||||
MvcResult result = this.mvc.perform(get("/authenticated")
|
||||
.with(bearerToken("token")))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().string("test-subject"))
|
||||
.andReturn();
|
||||
|
||||
assertThat(result.getRequest().getSession(false)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requestWhenUsingDefaultsAndNoBearerTokenThenSessionIsCreated()
|
||||
throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user