Skip to content

Commit 65a96b0

Browse files
Serialization Docstring Update
1 parent 4582ecd commit 65a96b0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

auth0/authentication/back_channel_login.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ def back_channel_login(
2222
binding_message (str): Human-readable string displayed on both the device calling /bc-authorize and the user’s
2323
authentication device to ensure the user is approves the correct request.
2424
25-
login_hint (str): A JSON object containing user details for authentication in the iss_sub format.
25+
login_hint (str): JSON string containing user details for authentication in the iss_sub format.Ensure
26+
serialization before passing.
2627
2728
scope(str): "openid" is a required scope.Multiple scopes are separated
2829
with whitespace.
2930
30-
authorization_details (str, list of dict, or dict, optional): JSON string or dictionary representing
31+
authorization_details (str, list of dict, optional): JSON string or dictionary representing
3132
Rich Authorization Requests (RAR) details to include in the CIBA request.
33+
If a Python list is provided, the SDK automatically serializes it to a JSON string before sending.
3234
3335
**kwargs: Other fields to send along with the request.
3436

auth0/test/authentication/test_back_channel_login.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_with_authorization_details(self, mock_post):
8080
g = BackChannelLogin("my.domain.com", "cid", client_secret="clsec")
8181
g.back_channel_login(
8282
binding_message="This is a binding message.",
83-
login_hint={"format": "iss_sub", "iss": "https://my.domain.auth0.com/", "sub": "auth0|USER_ID"},
83+
login_hint= json.dumps({"format": "iss_sub", "iss": "https://my.domain.auth0.com/", "sub": "auth0|USER_ID"}),
8484
scope="openid",
8585
authorization_details=[
8686
{
@@ -106,7 +106,7 @@ def test_with_authorization_details(self, mock_post):
106106
"client_id": "cid",
107107
"client_secret": "clsec",
108108
"binding_message": "This is a binding message.",
109-
"login_hint": {"format": "iss_sub", "iss": "https://my.domain.auth0.com/", "sub": "auth0|USER_ID"},
109+
"login_hint": json.dumps({"format": "iss_sub", "iss": "https://my.domain.auth0.com/", "sub": "auth0|USER_ID"}),
110110
"scope": "openid",
111111
"authorization_details": json.dumps([
112112
{

0 commit comments

Comments
 (0)