mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
auth: Convert GoogleMobileOAuth2Backend to accept a realm object.
This commit is contained in:
@@ -645,8 +645,10 @@ def api_fetch_api_key(request, username=REQ(), password=REQ()):
|
||||
# type: (HttpRequest, str, str) -> HttpResponse
|
||||
return_data = {} # type: Dict[str, bool]
|
||||
if username == "google-oauth2-token":
|
||||
subdomain = get_subdomain(request)
|
||||
realm = get_realm(subdomain)
|
||||
user_profile = authenticate(google_oauth2_token=password,
|
||||
realm_subdomain=get_subdomain(request),
|
||||
realm=realm,
|
||||
return_data=return_data)
|
||||
else:
|
||||
if not ldap_auth_enabled(realm=get_realm_from_request(request)):
|
||||
|
||||
Reference in New Issue
Block a user