authenticate static method

Future<Response> authenticate(
  1. String clientId,
  2. String secretKey
)

Implementation

static Future<Response> authenticate(
    String clientId, String secretKey) async {
  final Map<String, dynamic> formData = {
    'grant_type': 'client_credentials',
    'client_id': clientId,
    'client_secret': secretKey,
  };
  return await post(
    Uri.parse('${Constant.BASE_URL}/oauth/token'),
    body: formData,
  );
}