diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2DeviceCode.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2DeviceCode.java
index 95ffa0f847..c2127afdda 100644
--- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2DeviceCode.java
+++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2DeviceCode.java
@@ -28,7 +28,7 @@ import java.time.Instant;
* @see Section
* 3.2 Device Authorization Response
*/
-public final class OAuth2DeviceCode extends AbstractOAuth2Token {
+public class OAuth2DeviceCode extends AbstractOAuth2Token {
/**
* Constructs an {@code OAuth2DeviceCode} using the provided parameters.
diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2UserCode.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2UserCode.java
index b0ee177622..31d6b6b609 100644
--- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2UserCode.java
+++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/OAuth2UserCode.java
@@ -28,7 +28,7 @@ import java.time.Instant;
* @see Section
* 3.2 Device Authorization Response
*/
-public final class OAuth2UserCode extends AbstractOAuth2Token {
+public class OAuth2UserCode extends AbstractOAuth2Token {
/**
* Constructs an {@code OAuth2UserCode} using the provided parameters.
diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2DeviceAuthorizationResponse.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2DeviceAuthorizationResponse.java
index c4cedd59af..2d19a694f4 100644
--- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2DeviceAuthorizationResponse.java
+++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2DeviceAuthorizationResponse.java
@@ -129,16 +129,6 @@ public final class OAuth2DeviceAuthorizationResponse {
return new Builder(deviceCode, userCode);
}
- /**
- * Returns a new {@link Builder}, initialized with the provided response.
- * @param deviceAuthorizationResponse the response to initialize the builder with
- * @return the {@link Builder}
- */
- public static Builder withResponse(OAuth2DeviceAuthorizationResponse deviceAuthorizationResponse) {
- Assert.notNull(deviceAuthorizationResponse, "deviceAuthorizationResponse cannot be null");
- return new Builder(deviceAuthorizationResponse);
- }
-
/**
* A builder for {@link OAuth2DeviceAuthorizationResponse}.
*/
@@ -158,17 +148,6 @@ public final class OAuth2DeviceAuthorizationResponse {
private Map additionalParameters;
- private Builder(OAuth2DeviceAuthorizationResponse response) {
- OAuth2DeviceCode deviceCode = response.getDeviceCode();
- OAuth2UserCode userCode = response.getUserCode();
- this.deviceCode = deviceCode.getTokenValue();
- this.userCode = userCode.getTokenValue();
- this.verificationUri = response.getVerificationUri();
- this.verificationUriComplete = response.getVerificationUriComplete();
- this.expiresIn = ChronoUnit.SECONDS.between(deviceCode.getIssuedAt(), deviceCode.getExpiresAt());
- this.interval = response.getInterval();
- }
-
private Builder(OAuth2DeviceCode deviceCode, OAuth2UserCode userCode) {
this.deviceCode = deviceCode.getTokenValue();
this.userCode = userCode.getTokenValue();
diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2ParameterNames.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2ParameterNames.java
index 9d0c653d5e..d387b482d9 100644
--- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2ParameterNames.java
+++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/OAuth2ParameterNames.java
@@ -152,33 +152,32 @@ public final class OAuth2ParameterNames {
public static final String TOKEN_TYPE_HINT = "token_type_hint";
/**
- * {@code device_code} - used in Device Authorization Request and Device Authorization
- * Response.
+ * {@code device_code} - used in Device Authorization Response and Device Access Token
+ * Request.
* @since 6.1
*/
public static final String DEVICE_CODE = "device_code";
/**
- * {@code user_code} - used in Device Authorization Request and Device Authorization
- * Response.
+ * {@code user_code} - used in Device Authorization Response.
* @since 6.1
*/
public static final String USER_CODE = "user_code";
/**
- * {@code verification_uri} - Used in Device Authorization Response.
+ * {@code verification_uri} - used in Device Authorization Response.
* @since 6.1
*/
public static final String VERIFICATION_URI = "verification_uri";
/**
- * {@code verification_uri_complete} - Used in Device Authorization Response.
+ * {@code verification_uri_complete} - used in Device Authorization Response.
* @since 6.1
*/
public static final String VERIFICATION_URI_COMPLETE = "verification_uri_complete";
/**
- * {@code interval} - Used in Device Authorization Response.
+ * {@code interval} - used in Device Authorization Response.
* @since 6.1
*/
public static final String INTERVAL = "interval";
diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/http/converter/OAuth2DeviceAuthorizationResponseHttpMessageConverter.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/http/converter/OAuth2DeviceAuthorizationResponseHttpMessageConverter.java
index c1e67805a8..0dd4bb3588 100644
--- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/http/converter/OAuth2DeviceAuthorizationResponseHttpMessageConverter.java
+++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/http/converter/OAuth2DeviceAuthorizationResponseHttpMessageConverter.java
@@ -56,7 +56,7 @@ public class OAuth2DeviceAuthorizationResponseHttpMessageConverter
private static final ParameterizedTypeReference