@@ -176,6 +176,8 @@ def authenticate_with_password(
176176 ip_address : Optional [str ] = None ,
177177 device_id : Optional [str ] = None ,
178178 user_agent : Optional [str ] = None ,
179+ signals_id : Optional [str ] = None ,
180+ radar_auth_attempt_id : Optional [str ] = None ,
179181 request_options : Optional [RequestOptions ] = None ,
180182 ) -> AuthenticateResponse :
181183 """Authenticate with password."""
@@ -196,6 +198,10 @@ def authenticate_with_password(
196198 body ["device_id" ] = device_id
197199 if user_agent is not None :
198200 body ["user_agent" ] = user_agent
201+ if signals_id is not None :
202+ body ["signals_id" ] = signals_id
203+ if radar_auth_attempt_id is not None :
204+ body ["radar_auth_attempt_id" ] = radar_auth_attempt_id
199205
200206 return self ._client .request (
201207 method = "POST" ,
@@ -214,6 +220,7 @@ def authenticate_with_code(
214220 ip_address : Optional [str ] = None ,
215221 device_id : Optional [str ] = None ,
216222 user_agent : Optional [str ] = None ,
223+ signals_id : Optional [str ] = None ,
217224 request_options : Optional [RequestOptions ] = None ,
218225 ) -> AuthenticateResponse :
219226 """Authenticate with code."""
@@ -235,6 +242,8 @@ def authenticate_with_code(
235242 body ["device_id" ] = device_id
236243 if user_agent is not None :
237244 body ["user_agent" ] = user_agent
245+ if signals_id is not None :
246+ body ["signals_id" ] = signals_id
238247
239248 return self ._client .request (
240249 method = "POST" ,
@@ -289,6 +298,7 @@ def authenticate_with_magic_auth(
289298 ip_address : Optional [str ] = None ,
290299 device_id : Optional [str ] = None ,
291300 user_agent : Optional [str ] = None ,
301+ radar_auth_attempt_id : Optional [str ] = None ,
292302 request_options : Optional [RequestOptions ] = None ,
293303 ) -> AuthenticateResponse :
294304 """Authenticate with magic auth."""
@@ -309,6 +319,8 @@ def authenticate_with_magic_auth(
309319 body ["device_id" ] = device_id
310320 if user_agent is not None :
311321 body ["user_agent" ] = user_agent
322+ if radar_auth_attempt_id is not None :
323+ body ["radar_auth_attempt_id" ] = radar_auth_attempt_id
312324
313325 return self ._client .request (
314326 method = "POST" ,
@@ -456,6 +468,82 @@ def authenticate_with_device_code(
456468 request_options = request_options ,
457469 )
458470
471+ def authenticate_with_radar_email_challenge (
472+ self ,
473+ * ,
474+ code : str ,
475+ radar_challenge_id : str ,
476+ pending_authentication_token : str ,
477+ ip_address : Optional [str ] = None ,
478+ device_id : Optional [str ] = None ,
479+ user_agent : Optional [str ] = None ,
480+ request_options : Optional [RequestOptions ] = None ,
481+ ) -> AuthenticateResponse :
482+ """Authenticate with radar email challenge."""
483+ body : Dict [str , Any ] = {
484+ "grant_type" : "urn:workos:oauth:grant-type:radar-email-challenge:code" ,
485+ "code" : code ,
486+ "radar_challenge_id" : radar_challenge_id ,
487+ "pending_authentication_token" : pending_authentication_token ,
488+ }
489+ if self ._client .client_id is not None :
490+ body ["client_id" ] = self ._client .client_id
491+ if self ._client ._api_key is not None :
492+ body ["client_secret" ] = self ._client ._api_key
493+ if ip_address is not None :
494+ body ["ip_address" ] = ip_address
495+ if device_id is not None :
496+ body ["device_id" ] = device_id
497+ if user_agent is not None :
498+ body ["user_agent" ] = user_agent
499+
500+ return self ._client .request (
501+ method = "POST" ,
502+ path = ("user_management" , "authenticate" ),
503+ body = body ,
504+ model = AuthenticateResponse ,
505+ request_options = request_options ,
506+ )
507+
508+ def authenticate_with_radar_sms_challenge (
509+ self ,
510+ * ,
511+ code : str ,
512+ verification_id : str ,
513+ phone_number : str ,
514+ pending_authentication_token : str ,
515+ ip_address : Optional [str ] = None ,
516+ device_id : Optional [str ] = None ,
517+ user_agent : Optional [str ] = None ,
518+ request_options : Optional [RequestOptions ] = None ,
519+ ) -> AuthenticateResponse :
520+ """Authenticate with radar sms challenge."""
521+ body : Dict [str , Any ] = {
522+ "grant_type" : "urn:workos:oauth:grant-type:radar-sms-challenge:code" ,
523+ "code" : code ,
524+ "verification_id" : verification_id ,
525+ "phone_number" : phone_number ,
526+ "pending_authentication_token" : pending_authentication_token ,
527+ }
528+ if self ._client .client_id is not None :
529+ body ["client_id" ] = self ._client .client_id
530+ if self ._client ._api_key is not None :
531+ body ["client_secret" ] = self ._client ._api_key
532+ if ip_address is not None :
533+ body ["ip_address" ] = ip_address
534+ if device_id is not None :
535+ body ["device_id" ] = device_id
536+ if user_agent is not None :
537+ body ["user_agent" ] = user_agent
538+
539+ return self ._client .request (
540+ method = "POST" ,
541+ path = ("user_management" , "authenticate" ),
542+ body = body ,
543+ model = AuthenticateResponse ,
544+ request_options = request_options ,
545+ )
546+
459547 def get_authorization_url (
460548 self ,
461549 * ,
@@ -2379,6 +2467,8 @@ async def authenticate_with_password(
23792467 ip_address : Optional [str ] = None ,
23802468 device_id : Optional [str ] = None ,
23812469 user_agent : Optional [str ] = None ,
2470+ signals_id : Optional [str ] = None ,
2471+ radar_auth_attempt_id : Optional [str ] = None ,
23822472 request_options : Optional [RequestOptions ] = None ,
23832473 ) -> AuthenticateResponse :
23842474 """Authenticate with password."""
@@ -2399,6 +2489,10 @@ async def authenticate_with_password(
23992489 body ["device_id" ] = device_id
24002490 if user_agent is not None :
24012491 body ["user_agent" ] = user_agent
2492+ if signals_id is not None :
2493+ body ["signals_id" ] = signals_id
2494+ if radar_auth_attempt_id is not None :
2495+ body ["radar_auth_attempt_id" ] = radar_auth_attempt_id
24022496
24032497 return await self ._client .request (
24042498 method = "POST" ,
@@ -2417,6 +2511,7 @@ async def authenticate_with_code(
24172511 ip_address : Optional [str ] = None ,
24182512 device_id : Optional [str ] = None ,
24192513 user_agent : Optional [str ] = None ,
2514+ signals_id : Optional [str ] = None ,
24202515 request_options : Optional [RequestOptions ] = None ,
24212516 ) -> AuthenticateResponse :
24222517 """Authenticate with code."""
@@ -2438,6 +2533,8 @@ async def authenticate_with_code(
24382533 body ["device_id" ] = device_id
24392534 if user_agent is not None :
24402535 body ["user_agent" ] = user_agent
2536+ if signals_id is not None :
2537+ body ["signals_id" ] = signals_id
24412538
24422539 return await self ._client .request (
24432540 method = "POST" ,
@@ -2492,6 +2589,7 @@ async def authenticate_with_magic_auth(
24922589 ip_address : Optional [str ] = None ,
24932590 device_id : Optional [str ] = None ,
24942591 user_agent : Optional [str ] = None ,
2592+ radar_auth_attempt_id : Optional [str ] = None ,
24952593 request_options : Optional [RequestOptions ] = None ,
24962594 ) -> AuthenticateResponse :
24972595 """Authenticate with magic auth."""
@@ -2512,6 +2610,8 @@ async def authenticate_with_magic_auth(
25122610 body ["device_id" ] = device_id
25132611 if user_agent is not None :
25142612 body ["user_agent" ] = user_agent
2613+ if radar_auth_attempt_id is not None :
2614+ body ["radar_auth_attempt_id" ] = radar_auth_attempt_id
25152615
25162616 return await self ._client .request (
25172617 method = "POST" ,
@@ -2659,6 +2759,82 @@ async def authenticate_with_device_code(
26592759 request_options = request_options ,
26602760 )
26612761
2762+ async def authenticate_with_radar_email_challenge (
2763+ self ,
2764+ * ,
2765+ code : str ,
2766+ radar_challenge_id : str ,
2767+ pending_authentication_token : str ,
2768+ ip_address : Optional [str ] = None ,
2769+ device_id : Optional [str ] = None ,
2770+ user_agent : Optional [str ] = None ,
2771+ request_options : Optional [RequestOptions ] = None ,
2772+ ) -> AuthenticateResponse :
2773+ """Authenticate with radar email challenge."""
2774+ body : Dict [str , Any ] = {
2775+ "grant_type" : "urn:workos:oauth:grant-type:radar-email-challenge:code" ,
2776+ "code" : code ,
2777+ "radar_challenge_id" : radar_challenge_id ,
2778+ "pending_authentication_token" : pending_authentication_token ,
2779+ }
2780+ if self ._client .client_id is not None :
2781+ body ["client_id" ] = self ._client .client_id
2782+ if self ._client ._api_key is not None :
2783+ body ["client_secret" ] = self ._client ._api_key
2784+ if ip_address is not None :
2785+ body ["ip_address" ] = ip_address
2786+ if device_id is not None :
2787+ body ["device_id" ] = device_id
2788+ if user_agent is not None :
2789+ body ["user_agent" ] = user_agent
2790+
2791+ return await self ._client .request (
2792+ method = "POST" ,
2793+ path = ("user_management" , "authenticate" ),
2794+ body = body ,
2795+ model = AuthenticateResponse ,
2796+ request_options = request_options ,
2797+ )
2798+
2799+ async def authenticate_with_radar_sms_challenge (
2800+ self ,
2801+ * ,
2802+ code : str ,
2803+ verification_id : str ,
2804+ phone_number : str ,
2805+ pending_authentication_token : str ,
2806+ ip_address : Optional [str ] = None ,
2807+ device_id : Optional [str ] = None ,
2808+ user_agent : Optional [str ] = None ,
2809+ request_options : Optional [RequestOptions ] = None ,
2810+ ) -> AuthenticateResponse :
2811+ """Authenticate with radar sms challenge."""
2812+ body : Dict [str , Any ] = {
2813+ "grant_type" : "urn:workos:oauth:grant-type:radar-sms-challenge:code" ,
2814+ "code" : code ,
2815+ "verification_id" : verification_id ,
2816+ "phone_number" : phone_number ,
2817+ "pending_authentication_token" : pending_authentication_token ,
2818+ }
2819+ if self ._client .client_id is not None :
2820+ body ["client_id" ] = self ._client .client_id
2821+ if self ._client ._api_key is not None :
2822+ body ["client_secret" ] = self ._client ._api_key
2823+ if ip_address is not None :
2824+ body ["ip_address" ] = ip_address
2825+ if device_id is not None :
2826+ body ["device_id" ] = device_id
2827+ if user_agent is not None :
2828+ body ["user_agent" ] = user_agent
2829+
2830+ return await self ._client .request (
2831+ method = "POST" ,
2832+ path = ("user_management" , "authenticate" ),
2833+ body = body ,
2834+ model = AuthenticateResponse ,
2835+ request_options = request_options ,
2836+ )
2837+
26622838 def get_authorization_url (
26632839 self ,
26642840 * ,
0 commit comments