Enum forgejo_api::Auth
source · pub enum Auth<'a> {
Token(&'a str),
Password {
username: &'a str,
password: &'a str,
mfa: Option<&'a str>,
},
None,
}Expand description
Method of authentication to connect to the Forgejo host with.
Variants§
Token(&'a str)
Application Access Token. Grants access to scope enabled for the provided token, which may include full access.
To learn how to create a token, see the Codeberg docs on the subject.
To learn about token scope, see the official Forgejo docs.
Password
Username, password, and 2-factor auth code (if enabled). Grants full access to the user’s account.
None
No authentication. Only grants access to access public endpoints.
Auto Trait Implementations§
impl<'a> Freeze for Auth<'a>
impl<'a> RefUnwindSafe for Auth<'a>
impl<'a> Send for Auth<'a>
impl<'a> Sync for Auth<'a>
impl<'a> Unpin for Auth<'a>
impl<'a> UnwindSafe for Auth<'a>
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