pub struct PhabOAuthClient { /* private fields */ }
Implementations§
Source§impl PhabOAuthClient
impl PhabOAuthClient
pub fn new( phid: String, secret: String, redirect_url: String, phabricator_url: String, ) -> Result<PhabOAuthClient, PhabOAuthError>
pub fn get_auth_url(&self) -> Result<(Url, CsrfToken), PhabOAuthError>
pub async fn get_token( &self, code: String, ) -> Result<BasicTokenResponse, PhabOAuthError>
pub async fn get_user( &self, token: &AccessToken, ) -> Result<Option<PhabricatorUser>, PhabOAuthError>
Auto Trait Implementations§
impl Freeze for PhabOAuthClient
impl RefUnwindSafe for PhabOAuthClient
impl Send for PhabOAuthClient
impl Sync for PhabOAuthClient
impl Unpin for PhabOAuthClient
impl UnwindSafe for PhabOAuthClient
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