Remove deprecations in ClientAuthenticationMethod
Closes gh-11516
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user