From 6bc6946ad9c602b83246bec46d5899e979cbbb3e Mon Sep 17 00:00:00 2001 From: Steve Riesenberg <5248162+sjohnr@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:51:47 -0600 Subject: [PATCH] Make TokenType constructor public Closes gh-16086 --- .../security/oauth2/core/OAuth2AccessToken.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2AccessToken.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2AccessToken.java index 88fda0e609..ea1124d041 100644 --- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2AccessToken.java +++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2AccessToken.java @@ -114,7 +114,12 @@ public class OAuth2AccessToken extends AbstractOAuth2Token { private final String value; - private TokenType(String value) { + /** + * Constructs a {@code TokenType} using the provided value. + * @param value the value of the token type + * @since 6.5 + */ + public TokenType(String value) { Assert.hasText(value, "value cannot be empty"); this.value = value; }