mirror of
https://github.com/j93es/oauth-backend.git
synced 2026-06-04 07:11:52 +09:00
10 lines
No EOL
331 B
Python
10 lines
No EOL
331 B
Python
from urllib.parse import urlparse, parse_qs
|
|
|
|
def is_oauth_uri(uri: str) -> bool:
|
|
qs = parse_qs(urlparse(uri).query)
|
|
qs_keys = [*qs]
|
|
|
|
if "client_id" in qs_keys and any(p in qs_keys for p in (
|
|
"redirect_uri", "response_type", "grant_type", "scope", "state", "nonce")):
|
|
return True
|
|
return False |