[−][src]Struct sage_auth::signout::SignoutBuilder
SignoutBuilder
is used to generate a signout request
Invalidates access_token
s using an account's username and password.
For example:
let resp = SignoutBuilder::new() .username("USERNAME") .password("PASSWORD") .request() .await?;
Methods
impl<'a> SignoutBuilder<'a>
[src]
pub fn new() -> SignoutBuilder<'a>
[src]
pub fn username(&mut self, username: &'a str) -> &mut SignoutBuilder<'a>
[src]
Set username
pub fn password(&mut self, password: &'a str) -> &mut SignoutBuilder<'a>
[src]
Set password
pub fn server<T: IntoUrl>(
&mut self,
server: T
) -> Result<&mut SignoutBuilder<'a>>
[src]
&mut self,
server: T
) -> Result<&mut SignoutBuilder<'a>>
Set base url, default is https://authserver.mojang.com
.
pub fn endpoint(&mut self, endpoint: &'a str) -> &mut SignoutBuilder<'a>
[src]
set endpoint, default is /authenticate
.
pub async fn request<'_>(&'_ mut self) -> Result<()>
[src]
Make a request with the given parameters.
If success, it will return Ok(())
.
Trait Implementations
impl<'_> Default for SignoutBuilder<'_>
[src]
fn default() -> SignoutBuilder<'static>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for SignoutBuilder<'a>
impl<'a> Send for SignoutBuilder<'a>
impl<'a> Sync for SignoutBuilder<'a>
impl<'a> Unpin for SignoutBuilder<'a>
impl<'a> UnwindSafe for SignoutBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,