canRequestOAuthToken method

bool canRequestOAuthToken({
  1. required String authorizationEndpoint,
  2. required String clientId,
})

Implementation

bool canRequestOAuthToken({required String authorizationEndpoint, required String clientId}) {
  if (requestOAuthToken == null) return true;
  for (final t in requestOAuthToken!) {
    final match =
        t.endpoint == authorizationEndpoint ||
        (_hasWildcardSuffix(t.endpoint) && authorizationEndpoint.startsWith(_stripWildcardSuffix(t.endpoint)));
    if (match && t.clientId == clientId) return true;
  }
  return false;
}