exchangeDeviceCodeForToken method
Produces an authorization token from a given device code.
Implementation
FutureOr<AuthorizationTokenResponse> exchangeDeviceCodeForToken(
Client client,
String? deviceCode,
String state,
RequestContext req,
ResponseContext res) async {
var body = await req.parseBody().then((_) => req.bodyAsMap);
throw AuthorizationException(
ErrorResponse(
ErrorResponse.unsupportedResponseType,
'Device code grants are not supported.',
body['state']?.toString() ?? '',
),
statusCode: 400,
);
}