generateRefreshToken method
Future
generateRefreshToken(
{ - required String clientKey,
- required String clientSecret,
})
override
Implementation
@override
Future<dynamic> generateRefreshToken(
{required final String clientKey,
required final String clientSecret}) async {
final basic = "$clientKey:$clientSecret";
final encoded = base64Encode((utf8.encode(basic)));
String basicAuth = 'Basic $encoded';
_dio.options.headers['Authorization'] = basicAuth;
try {
final response = await _dio.post('/User/GenerateRefreshToken');
return response.data;
} on DioException catch (e) {
if (e.response != null) {
throw e.response.toString();
} else {
throw e.message.toString();
}
}
}