mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-12 07:02:13 +00:00
Revert "Polish SCrypt Upgrade Support"
This reverts commit 0d5392103990430787b0f322c2c9fc94494bb7e5.
This commit is contained in:
parent
0d53921039
commit
57bc456ad6
@ -486,7 +486,7 @@ public final class ClientRegistration implements Serializable {
|
||||
this.validateClientCredentialsGrantType();
|
||||
} else if (AuthorizationGrantType.IMPLICIT.equals(this.authorizationGrantType)) {
|
||||
this.validateImplicitGrantType();
|
||||
} else if (AuthorizationGrantType.AUTHORIZATION_CODE.equals(this.authorizationGrantType)) {
|
||||
} else {
|
||||
this.validateAuthorizationCodeGrantType();
|
||||
}
|
||||
return this.create();
|
||||
|
@ -535,27 +535,4 @@ public class ClientRegistrationTests {
|
||||
.build()
|
||||
).isInstanceOf(IllegalArgumentException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void buildWhenCustomGrantAllAttributesProvidedThenAllAttributesAreSet() {
|
||||
AuthorizationGrantType customGrantType = new AuthorizationGrantType("CUSTOM");
|
||||
ClientRegistration registration = ClientRegistration.withRegistrationId(REGISTRATION_ID)
|
||||
.clientId(CLIENT_ID)
|
||||
.clientSecret(CLIENT_SECRET)
|
||||
.clientAuthenticationMethod(ClientAuthenticationMethod.BASIC)
|
||||
.authorizationGrantType(customGrantType)
|
||||
.scope(SCOPES.toArray(new String[0]))
|
||||
.tokenUri(TOKEN_URI)
|
||||
.clientName(CLIENT_NAME)
|
||||
.build();
|
||||
|
||||
assertThat(registration.getRegistrationId()).isEqualTo(REGISTRATION_ID);
|
||||
assertThat(registration.getClientId()).isEqualTo(CLIENT_ID);
|
||||
assertThat(registration.getClientSecret()).isEqualTo(CLIENT_SECRET);
|
||||
assertThat(registration.getClientAuthenticationMethod()).isEqualTo(ClientAuthenticationMethod.BASIC);
|
||||
assertThat(registration.getAuthorizationGrantType()).isEqualTo(customGrantType);
|
||||
assertThat(registration.getScopes()).isEqualTo(SCOPES);
|
||||
assertThat(registration.getProviderDetails().getTokenUri()).isEqualTo(TOKEN_URI);
|
||||
assertThat(registration.getClientName()).isEqualTo(CLIENT_NAME);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user