1
0
mirror of synced 2026-08-04 17:27:13 +00:00

Rename to OidcAuthorizationCodeReactiveAuthenticationManager

Renamed OidcReactiveAuthenticationManager to
OidcAuthorizationCodeReactiveAuthenticationManager since it only handles
authorization code flow.

Fixes: gh-5530
This commit is contained in:
Rob Winch
2018-07-26 15:10:33 -05:00
parent 5f20bb3d50
commit 1c8a931e33
3 changed files with 10 additions and 10 deletions
@@ -73,7 +73,7 @@ import java.util.function.Function;
* @see <a target="_blank" href="https://tools.ietf.org/html/rfc6749#section-4.1.3">Section 4.1.3 Access Token Request</a>
* @see <a target="_blank" href="https://tools.ietf.org/html/rfc6749#section-4.1.4">Section 4.1.4 Access Token Response</a>
*/
public class OidcReactiveAuthenticationManager implements
public class OidcAuthorizationCodeReactiveAuthenticationManager implements
ReactiveAuthenticationManager {
private static final String INVALID_STATE_PARAMETER_ERROR_CODE = "invalid_state_parameter";
@@ -91,7 +91,7 @@ public class OidcReactiveAuthenticationManager implements
private Function<ClientRegistration, ReactiveJwtDecoder> decoderFactory = new DefaultDecoderFactory();
public OidcReactiveAuthenticationManager(
public OidcAuthorizationCodeReactiveAuthenticationManager(
ReactiveOAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient,
ReactiveOAuth2UserService<OidcUserRequest, OidcUser> userService,
ReactiveOAuth2AuthorizedClientService authorizedClientService) {
@@ -65,7 +65,7 @@ import static org.mockito.Mockito.when;
* @since 5.1
*/
@RunWith(MockitoJUnitRunner.class)
public class OidcReactiveAuthenticationManagerTests {
public class OidcAuthorizationCodeReactiveAuthenticationManagerTests {
@Mock
private ReactiveOAuth2UserService<OidcUserRequest, OidcUser> userService;
@@ -99,11 +99,11 @@ public class OidcReactiveAuthenticationManagerTests {
private OidcIdToken idToken = new OidcIdToken("token123", Instant.now(),
Instant.now().plusSeconds(3600), Collections.singletonMap(IdTokenClaimNames.SUB, "sub123"));
private OidcReactiveAuthenticationManager manager;
private OidcAuthorizationCodeReactiveAuthenticationManager manager;
@Before
public void setup() {
this.manager = new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
this.manager = new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
this.authorizedClientService);
when(this.authorizedClientService.saveAuthorizedClient(any(), any())).thenReturn(
Mono.empty());
@@ -112,7 +112,7 @@ public class OidcReactiveAuthenticationManagerTests {
@Test
public void constructorWhenNullAccessTokenResponseClientThenIllegalArgumentException() {
this.accessTokenResponseClient = null;
assertThatThrownBy(() -> new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
assertThatThrownBy(() -> new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
this.authorizedClientService))
.isInstanceOf(IllegalArgumentException.class);
}
@@ -120,7 +120,7 @@ public class OidcReactiveAuthenticationManagerTests {
@Test
public void constructorWhenNullUserServiceThenIllegalArgumentException() {
this.userService = null;
assertThatThrownBy(() -> new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
assertThatThrownBy(() -> new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
this.authorizedClientService))
.isInstanceOf(IllegalArgumentException.class);
}
@@ -128,7 +128,7 @@ public class OidcReactiveAuthenticationManagerTests {
@Test
public void constructorWhenNullAuthorizedClientServiceThenIllegalArgumentException() {
this.authorizedClientService = null;
assertThatThrownBy(() -> new OidcReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
assertThatThrownBy(() -> new OidcAuthorizationCodeReactiveAuthenticationManager(this.accessTokenResponseClient, this.userService,
this.authorizedClientService))
.isInstanceOf(IllegalArgumentException.class);
}