@Immutable public class DeviceCodeGrant extends AuthorizationGrant
Related specifications:
Modifier and Type | Field | Description |
---|---|---|
static GrantType |
GRANT_TYPE |
The grant type.
|
Constructor | Description |
---|---|
DeviceCodeGrant(DeviceCode deviceCode) |
Creates a new device code grant.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object o) |
|
DeviceCode |
getDeviceCode() |
Returns the device code received from the authorisation server.
|
int |
hashCode() |
|
static DeviceCodeGrant |
parse(Map<String,List<String>> params) |
Parses a device code grant from the specified request body
parameters.
|
Map<String,List<String>> |
toParameters() |
Returns the request body parameters for the authorisation grant.
|
getType
public static final GrantType GRANT_TYPE
public DeviceCodeGrant(DeviceCode deviceCode)
deviceCode
- The device code. Must not be null
.public DeviceCode getDeviceCode()
public Map<String,List<String>> toParameters()
AuthorizationGrant
toParameters
in class AuthorizationGrant
public static DeviceCodeGrant parse(Map<String,List<String>> params) throws ParseException
Example:
grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Adevice_code &device_code=GmRhmhcxhwAzkoEqiMEg_DnyEysNkuNhszIySk9eS
params
- The parameters.ParseException
- If parsing failed.Copyright © 2019 Connect2id Ltd.. All rights reserved.