pub enum OAuthTokenRequest<'a> {
Confidential {
client_id: &'a str,
client_secret: &'a str,
code: &'a str,
redirect_uri: Url,
},
Public {
client_id: &'a str,
code_verifier: &'a str,
code: &'a str,
redirect_uri: Url,
},
Refresh {
refresh_token: &'a str,
client_id: &'a str,
client_secret: &'a str,
},
}Expand description
A Request for a new OAuth2 access token
More info at Forgejo’s docs.
Variants§
Confidential
Request for getting an access code for a confidential app
The code field must have come from sending the user to
/login/oauth/authorize in their browser
Public
Request for getting an access code for a public app
The code field must have come from sending the user to
/login/oauth/authorize in their browser
Refresh
Request for refreshing an access code
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for OAuthTokenRequest<'a>
impl<'a> RefUnwindSafe for OAuthTokenRequest<'a>
impl<'a> Send for OAuthTokenRequest<'a>
impl<'a> Sync for OAuthTokenRequest<'a>
impl<'a> Unpin for OAuthTokenRequest<'a>
impl<'a> UnwindSafe for OAuthTokenRequest<'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