@@ -266,7 +266,7 @@ def backchannel_login(
266266 use urn:openid:params:grant-type:ciba
267267
268268 Returns:
269- access_token, id_token
269+ access_token, id_token, refresh_token, token_type, expires_in, scope and authorization_details
270270 """
271271
272272 return self .authenticated_post (
@@ -284,7 +284,8 @@ def access_token_for_connection(
284284 subject_token : str ,
285285 requested_token_type : str ,
286286 connection : str | None = None ,
287- grant_type : str = "urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token"
287+ grant_type : str = "urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token" ,
288+ login_hint : str = None
288289 ) -> Any :
289290 """Calls /oauth/token endpoint with federated-connection-access-token grant type
290291
@@ -293,22 +294,29 @@ def access_token_for_connection(
293294
294295 subject_token (str): String containing the value of subject_token_type.
295296
296- requested_token_type (str): String containing the type of rquested token.
297+ requested_token_type (str): String containing the type of requested token.
297298
298299 connection (str, optional): Denotes the name of a social identity provider configured to your application
299300
301+ login_hint (str, optional): A hint to the OpenID Provider regarding the end-user for whom authentication is being requested
302+
300303 Returns:
301- access_token, scope, issued_token_type, token_type
304+ access_token, scope, issued_token_type, token_type, expires_in
302305 """
303306
307+ data = {
308+ "client_id" : self .client_id ,
309+ "grant_type" : grant_type ,
310+ "subject_token_type" : subject_token_type ,
311+ "subject_token" : subject_token ,
312+ "requested_token_type" : requested_token_type ,
313+ "connection" : connection ,
314+ }
315+
316+ if login_hint :
317+ data ["login_hint" ] = login_hint
318+
304319 return self .authenticated_post (
305320 f"{ self .protocol } ://{ self .domain } /oauth/token" ,
306- data = {
307- "client_id" : self .client_id ,
308- "grant_type" : grant_type ,
309- "subject_token_type" : subject_token_type ,
310- "subject_token" : subject_token ,
311- "requested_token_type" : requested_token_type ,
312- "connection" : connection ,
313- },
321+ data = data ,
314322 )
0 commit comments