@@ -419,3 +419,95 @@ def invalidate_remembered_browsers(self, user_id):
419419
420420 url = self ._url (f"{ user_id } /multifactor/actions/invalidate-remember-browser" )
421421 return self .client .post (url )
422+
423+ def get_authentication_methods (self , user_id ):
424+ """Gets a list of authentication methods
425+
426+ Args:
427+ user_id (str): The user_id to get a list of authentication methods for.
428+
429+ See: https://auth0.com/docs/api/management/v2#!/Users/get_authentication_methods
430+ """
431+
432+ url = self ._url (f"{ user_id } /authentication-methods" )
433+ return self .client .get (url )
434+
435+ def get_authentication_method_by_id (self , user_id , authentication_method_id ):
436+ """Gets an authentication method by ID.
437+
438+ Args:
439+ user_id (str): The user_id to get an authentication method by ID for.
440+ authentication_method_id (str): The authentication_method_id to get an authentication method by ID for.
441+
442+ See: https://auth0.com/docs/api/management/v2#!/Users/get_authentication_methods_by_authentication_method_id
443+ """
444+
445+ url = self ._url (f"{ user_id } /authentication-methods/{ authentication_method_id } " )
446+ return self .client .get (url )
447+
448+ def create_authentication_method (self , user_id , body ):
449+ """Creates an authentication method for a given user.
450+
451+ Args:
452+ user_id (str): The user_id to create an authentication method for a given user.
453+ body (dict): the request body to create an authentication method for a given user.
454+
455+ See: https://auth0.com/docs/api/management/v2#!/Users/post_authentication_methods
456+ """
457+
458+ url = self ._url (f"{ user_id } /authentication-methods" )
459+ return self .client .post (url , data = body )
460+
461+ def update_authentication_methods (self , user_id , body ):
462+ """Updates all authentication methods for a user by replacing them with the given ones.
463+
464+ Args:
465+ user_id (str): The user_id to update all authentication methods for.
466+ body (dict): the request body to update all authentication methods with.
467+
468+ See: https://auth0.com/docs/api/management/v2#!/Users/put_authentication_methods
469+ """
470+
471+ url = self ._url (f"{ user_id } /authentication-methods" )
472+ return self .client .put (url , data = body )
473+
474+ def update_authentication_method_by_id (
475+ self , user_id , authentication_method_id , body
476+ ):
477+ """Updates an authentication method.
478+
479+ Args:
480+ user_id (str): The user_id to update an authentication method.
481+ authentication_method_id (str): The authentication_method_id to update an authentication method for.
482+ body (dict): the request body to update an authentication method.
483+
484+ See: https://auth0.com/docs/api/management/v2#!/Users/patch_authentication_methods_by_authentication_method_id
485+ """
486+
487+ url = self ._url (f"{ user_id } /authentication-methods/{ authentication_method_id } " )
488+ return self .client .patch (url , data = body )
489+
490+ def delete_authentication_methods (self , user_id ):
491+ """Deletes all authentication methods for the given user.
492+
493+ Args:
494+ user_id (str): The user_id to delete all authentication methods for the given user for.
495+
496+ See: https://auth0.com/docs/api/management/v2#!/Users/delete_authentication_methods
497+ """
498+
499+ url = self ._url (f"{ user_id } /authentication-methods" )
500+ return self .client .delete (url )
501+
502+ def delete_authentication_method_by_id (self , user_id , authentication_method_id ):
503+ """Deletes an authentication method by ID.
504+
505+ Args:
506+ user_id (str): The user_id to delete an authentication method by ID for.
507+ authentication_method_id (str): The authentication_method_id to delete an authentication method by ID for.
508+
509+ See: https://auth0.com/docs/api/management/v2#!/Users/delete_authentication_methods_by_authentication_method_id
510+ """
511+
512+ url = self ._url (f"{ user_id } /authentication-methods/{ authentication_method_id } " )
513+ return self .client .delete (url )
0 commit comments