Remove deprecations in ClientAuthenticationMethod

Closes gh-11516
This commit is contained in:
Joe Grandja
2022-07-15 07:01:24 -04:00
parent 8c12c3dad0
commit be58e2ac49
10 changed files with 22 additions and 54 deletions

View File

@@ -34,24 +34,12 @@ public final class ClientAuthenticationMethod implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
/**
* @deprecated Use {@link #CLIENT_SECRET_BASIC}
*/
@Deprecated
public static final ClientAuthenticationMethod BASIC = new ClientAuthenticationMethod("basic");
/**
* @since 5.5
*/
public static final ClientAuthenticationMethod CLIENT_SECRET_BASIC = new ClientAuthenticationMethod(
"client_secret_basic");
/**
* @deprecated Use {@link #CLIENT_SECRET_POST}
*/
@Deprecated
public static final ClientAuthenticationMethod POST = new ClientAuthenticationMethod("post");
/**
* @since 5.5
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,21 +33,11 @@ public class ClientAuthenticationMethodTests {
assertThatIllegalArgumentException().isThrownBy(() -> new ClientAuthenticationMethod(null));
}
@Test
public void getValueWhenAuthenticationMethodBasicThenReturnBasic() {
assertThat(ClientAuthenticationMethod.BASIC.getValue()).isEqualTo("basic");
}
@Test
public void getValueWhenAuthenticationMethodClientSecretBasicThenReturnClientSecretBasic() {
assertThat(ClientAuthenticationMethod.CLIENT_SECRET_BASIC.getValue()).isEqualTo("client_secret_basic");
}
@Test
public void getValueWhenAuthenticationMethodPostThenReturnPost() {
assertThat(ClientAuthenticationMethod.POST.getValue()).isEqualTo("post");
}
@Test
public void getValueWhenAuthenticationMethodClientSecretPostThenReturnClientSecretPost() {
assertThat(ClientAuthenticationMethod.CLIENT_SECRET_POST.getValue()).isEqualTo("client_secret_post");