|
@@ -65,7 +65,7 @@ import static org.mockito.Mockito.when;
|
|
* @since 5.1
|
|
* @since 5.1
|
|
*/
|
|
*/
|
|
@RunWith(MockitoJUnitRunner.class)
|
|
@RunWith(MockitoJUnitRunner.class)
|
|
-public class OidcReactiveAuthenticationManagerTests {
|
|
|
|
|
|
+public class OidcAuthorizationCodeReactiveAuthenticationManagerTests {
|
|
@Mock
|
|
@Mock
|
|
private ReactiveOAuth2UserService<OidcUserRequest, OidcUser> userService;
|
|
private ReactiveOAuth2UserService<OidcUserRequest, OidcUser> userService;
|
|
|
|
|
|
@@ -99,11 +99,11 @@ public class OidcReactiveAuthenticationManagerTests {
|
|
private OidcIdToken idToken = new OidcIdToken("token123", Instant.now(),
|
|
private OidcIdToken idToken = new OidcIdToken("token123", Instant.now(),
|
|
Instant.now().plusSeconds(3600), Collections.singletonMap(IdTokenClaimNames.SUB, "sub123"));
|
|
Instant.now().plusSeconds(3600), Collections.singletonMap(IdTokenClaimNames.SUB, "sub123"));
|
|
|
|
|
|
- private OidcReactiveAuthenticationManager manager;
|
|
|
|
|
|
+ private OidcAuthorizationCodeReactiveAuthenticationManager manager;
|
|
|
|
|
|
@Before
|
|
@Before
|
|
public void setup() {
|
|
public void setup() {
|
|
- this.manager = new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
|
|
|
|
+ this.manager = new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
this.authorizedClientService);
|
|
this.authorizedClientService);
|
|
when(this.authorizedClientService.saveAuthorizedClient(any(), any())).thenReturn(
|
|
when(this.authorizedClientService.saveAuthorizedClient(any(), any())).thenReturn(
|
|
Mono.empty());
|
|
Mono.empty());
|
|
@@ -112,7 +112,7 @@ public class OidcReactiveAuthenticationManagerTests {
|
|
@Test
|
|
@Test
|
|
public void constructorWhenNullAccessTokenResponseClientThenIllegalArgumentException() {
|
|
public void constructorWhenNullAccessTokenResponseClientThenIllegalArgumentException() {
|
|
this.accessTokenResponseClient = null;
|
|
this.accessTokenResponseClient = null;
|
|
- assertThatThrownBy(() -> new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
|
|
|
|
+ assertThatThrownBy(() -> new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
this.authorizedClientService))
|
|
this.authorizedClientService))
|
|
.isInstanceOf(IllegalArgumentException.class);
|
|
.isInstanceOf(IllegalArgumentException.class);
|
|
}
|
|
}
|
|
@@ -120,7 +120,7 @@ public class OidcReactiveAuthenticationManagerTests {
|
|
@Test
|
|
@Test
|
|
public void constructorWhenNullUserServiceThenIllegalArgumentException() {
|
|
public void constructorWhenNullUserServiceThenIllegalArgumentException() {
|
|
this.userService = null;
|
|
this.userService = null;
|
|
- assertThatThrownBy(() -> new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
|
|
|
|
+ assertThatThrownBy(() -> new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
this.authorizedClientService))
|
|
this.authorizedClientService))
|
|
.isInstanceOf(IllegalArgumentException.class);
|
|
.isInstanceOf(IllegalArgumentException.class);
|
|
}
|
|
}
|
|
@@ -128,7 +128,7 @@ public class OidcReactiveAuthenticationManagerTests {
|
|
@Test
|
|
@Test
|
|
public void constructorWhenNullAuthorizedClientServiceThenIllegalArgumentException() {
|
|
public void constructorWhenNullAuthorizedClientServiceThenIllegalArgumentException() {
|
|
this.authorizedClientService = null;
|
|
this.authorizedClientService = null;
|
|
- assertThatThrownBy(() -> new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
|
|
|
|
+ assertThatThrownBy(() -> new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
|
|
this.authorizedClientService))
|
|
this.authorizedClientService))
|
|
.isInstanceOf(IllegalArgumentException.class);
|
|
.isInstanceOf(IllegalArgumentException.class);
|
|
}
|
|
}
|