isOAuth static method

bool isOAuth(
  1. Map<String, String> headers
)

Wether headers is valid for OAuth.

Implementation

static bool isOAuth(Map<String, String> headers) {
  final keys = [
    'scope',
    'token_type',
    'access_token',
    'refresh_token',
    'expires_at',
    'expires_in',
  ];
  return keys.every((key) => headers.containsKey(key));
}