Skip to content

Commit e5bb196

Browse files
authored
Merge pull request #65 from dataiku/feature/impersonated-webapps-core
add proxy ticket call
2 parents 46eb039 + bef26db commit e5bb196

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

dataikuapi/dssclient.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,21 @@ def get_auth_info_from_browser_headers(self, headers_dict, with_secrets=False):
881881
"""
882882
return self._perform_json("POST", "/auth/info-from-browser-headers",
883883
params={"withSecrets": with_secrets}, body=headers_dict)
884+
885+
def get_ticket_from_browser_headers(self, headers_dict):
886+
"""
887+
Returns a ticket for the DSS user authenticated by the dictionary of
888+
HTTP headers provided in headers_dict.
889+
890+
This is only used in webapp backends
891+
892+
This method returns a ticket to use as a X-DKU-APITicket header
893+
894+
:param: headers_dict dict: Dictionary of HTTP headers
895+
:returns: a string
896+
:rtype: string
897+
"""
898+
return self._perform_json("POST", "/auth/ticket-from-browser-headers", body=headers_dict)
884899

885900
def create_personal_api_key(self, label):
886901
"""

0 commit comments

Comments
 (0)