Interface DeviceCodeResponse
@Immutable
public interface DeviceCodeResponse
A device authorization response as defined in RFC 8628 Section 3.2.
Example of response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"device_code":"GmRhmhcxhwAzkoEqiMEg_DnyEysNkuNhszIySk9eS",
"user_code":"WDJB-MJHT",
"verification_uri":"https://example.com/device",
"verification_uri_complete":"https://example.com/device?user_code=WDJB-MJHT",
"expires_in":1800,
"interval":5
}
-
Method Summary
Modifier and TypeMethodDescriptionREQUIRED.REQUIRED.OPTIONAL.REQUIRED.REQUIRED.OPTIONAL.
-
Method Details
-
getDeviceCode
String getDeviceCode()REQUIRED. The device verification code. -
getUserCode
String getUserCode()REQUIRED. The end-user verification code. -
getVerificationUri
URI getVerificationUri()REQUIRED. The end-user verification URI on the authorization server. The URI should be short and easy to remember as end users will be asked to manually type it into their user agent. -
getVerificationUriComplete
OPTIONAL. A verification URI that includes the "user_code" (or other information with the same function as the "user_code"), which is designed for non-textual transmission. -
getExpiresIn
Duration getExpiresIn()REQUIRED. The lifetime in seconds of the "device_code" and "user_code". -
getInterval
OPTIONAL. The minimum amount of time in seconds that the client SHOULD wait between polling requests to the token endpoint. If no value is provided, clients MUST use 5 as the default.
-