approveDevice method
Approve a device grant.
@param {String} client_id (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate. @param {String} client_secret (Optional) The client secret. This value will be required if client authentication is enabled. @param {String} token The access token used to identify the user. @param {String} user_code The end-user verification code. @returns {Promise<ClientResponse
Implementation
Future<ClientResponse<DeviceApprovalResponse, Errors>> approveDevice(
String client_id, String client_secret, String token, String user_code) {
var body = <String, dynamic>{};
body['client_id'] = client_id;
body['client_secret'] = client_secret;
body['token'] = token;
body['user_code'] = user_code;
return _start<DeviceApprovalResponse, Errors>()
.withUri('/oauth2/device/approve')
.withFormData(body)
.withMethod('POST')
.withResponseHandler(defaultResponseHandlerBuilder(
(d) => DeviceApprovalResponse.fromJson(d)))
.go();
}