mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Add ClientAuthenticationMethod constants tls_client_auth and self_signed_tls_client_auth
Closes gh-14889
This commit is contained in:
parent
644cfa9f87
commit
9a7f1aa4d9
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -62,6 +62,17 @@ public final class ClientAuthenticationMethod implements Serializable {
|
|||||||
*/
|
*/
|
||||||
public static final ClientAuthenticationMethod NONE = new ClientAuthenticationMethod("none");
|
public static final ClientAuthenticationMethod NONE = new ClientAuthenticationMethod("none");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 6.3
|
||||||
|
*/
|
||||||
|
public static final ClientAuthenticationMethod TLS_CLIENT_AUTH = new ClientAuthenticationMethod("tls_client_auth");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 6.3
|
||||||
|
*/
|
||||||
|
public static final ClientAuthenticationMethod SELF_SIGNED_TLS_CLIENT_AUTH = new ClientAuthenticationMethod(
|
||||||
|
"self_signed_tls_client_auth");
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2022 the original author or authors.
|
* Copyright 2002-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -58,4 +58,15 @@ public class ClientAuthenticationMethodTests {
|
|||||||
assertThat(ClientAuthenticationMethod.NONE.getValue()).isEqualTo("none");
|
assertThat(ClientAuthenticationMethod.NONE.getValue()).isEqualTo("none");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getValueWhenAuthenticationMethodTlsClientAuthThenReturnTlsClientAuth() {
|
||||||
|
assertThat(ClientAuthenticationMethod.TLS_CLIENT_AUTH.getValue()).isEqualTo("tls_client_auth");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getValueWhenAuthenticationMethodSelfSignedTlsClientAuthThenReturnSelfSignedTlsClientAuth() {
|
||||||
|
assertThat(ClientAuthenticationMethod.SELF_SIGNED_TLS_CLIENT_AUTH.getValue())
|
||||||
|
.isEqualTo("self_signed_tls_client_auth");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user