pub struct Auth0Client { /* private fields */ }Implementations§
Source§impl Auth0Client
impl Auth0Client
pub fn new(config: &Auth0Config, token: String) -> Self
pub async fn get_user_by_email( &self, email: &str, ) -> Result<Vec<Auth0User>, AppError>
Sourcepub async fn create_user(
&self,
name: &str,
email: &str,
role: &Role,
) -> Result<Auth0User, AppError>
pub async fn create_user( &self, name: &str, email: &str, role: &Role, ) -> Result<Auth0User, AppError>
Creates a new user in Auth0 with the given role.
Returns an error if creation fails.
role accepts values like "admin", "super_admin", or "worker" (mapped to "ADMIN",
"SUPER_ADMIN", "WORKER" in Auth0).
pub async fn update_user( &self, user_id: &str, req: UpdateUserRequest, role: Option<&Role>, ) -> Result<Auth0User, AppError>
pub async fn delete_user(&self, user_id: &str) -> Result<(), AppError>
Auto Trait Implementations§
impl Freeze for Auth0Client
impl !RefUnwindSafe for Auth0Client
impl Send for Auth0Client
impl Sync for Auth0Client
impl Unpin for Auth0Client
impl UnsafeUnpin for Auth0Client
impl !UnwindSafe for Auth0Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more