Skip to content

Commit

Permalink
Add ClientAuthenticationMethod constants tls_client_auth and self_sig…
Browse files Browse the repository at this point in the history
…ned_tls_client_auth

Closes gh-14889
  • Loading branch information
jgrandja committed Apr 11, 2024
1 parent 644cfa9 commit 9a7f1aa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,6 +62,17 @@ public final class ClientAuthenticationMethod implements Serializable {
*/
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;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,4 +58,15 @@ public void getValueWhenAuthenticationMethodNoneThenReturnNone() {
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");
}

}

0 comments on commit 9a7f1aa

Please sign in to comment.