shared::api::endpoints::user

Struct VerifyEmail

Source
pub struct VerifyEmail;
Expand description

Verify a user’s email.

§Register Flow

  1. POST /v1/user
    • This will send the email for verification
  2. POST this route with the Verify request.

§Change email Flow (NOT CURRENTLY IMPLEMENTED)

  1. PUT /v1/user/me/email
    • this will send an email to verify the old address
  2. POST this route with the token from the email
    • this will send an email to verify the new address
  3. POST this route again with the token from the new address
    • The new email will get set at this point, recieve one of:
      1. a 204 (success!)
      2. a 401 response (token is invalid)

§Resend verification email

  1. POST this route with no auth and Resend
    • this resend will the verification email
    • this will always return a 204 on success.
  2. Continue the flow you were in.

If no verification is in progress, no email will be sent.

Trait Implementations§

Source§

impl ApiEndpoint for VerifyEmail

Source§

const METHOD: Method = Method::Post

The method used to make a request to the endpoint.
Source§

type Req = VerifyEmailRequest

The request type for this endpoint.
Source§

type Res = Option<NewSessionResponse>

The response type for this endpoint.
Source§

type Path = VerifyEmailPath

The path type for this endpoint.
Source§

type Err = EmptyError

The (inner) error type for this endpoint.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T