pub struct DevinAuth { /* private fields */ }Expand description
DevinAuthService: PKCE URL, code exchange, profile and seat status.
Implementations§
Source§impl DevinAuth
impl DevinAuth
pub fn new(client: Client) -> Self
Sourcepub fn with_app_base(self, url: &str) -> Self
pub fn with_app_base(self, url: &str) -> Self
SetAppBaseURL.
Sourcepub fn with_api_base(self, url: &str) -> Self
pub fn with_api_base(self, url: &str) -> Self
SetAPIBaseURL.
Sourcepub fn with_server_base(self, url: &str) -> Self
pub fn with_server_base(self, url: &str) -> Self
SetServerBaseURL.
BuildAuthorizationURL: query parameters in the Devin CLI’s order; without a
redirect URI it is the headless manual-code URL (cli_pkce_marker=1).
Sourcepub async fn exchange_code(
&self,
code: &str,
code_verifier: &str,
) -> Result<String, String>
pub async fn exchange_code( &self, code: &str, code_verifier: &str, ) -> Result<String, String>
ExchangeCodeForToken: the session token for an authorization code.
Sourcepub async fn fetch_self_profile(
&self,
session_token: &str,
) -> Result<(String, String, String), String>
pub async fn fetch_self_profile( &self, session_token: &str, ) -> Result<(String, String, String), String>
FetchSelfProfile: user name, user ID and org ID from /v3/self (empty unless
the answer is 200).
Sourcepub async fn fetch_user_status(
&self,
session_token: &str,
device_seed: &str,
) -> Result<UserStatus, String>
pub async fn fetch_user_status( &self, session_token: &str, device_seed: &str, ) -> Result<UserStatus, String>
FetchUserStatus: GetUserStatus over Connect-RPC unary protobuf.
Sourcepub async fn create_auth_record(
&self,
token: &str,
) -> Result<AuthRecord, String>
pub async fn create_auth_record( &self, token: &str, ) -> Result<AuthRecord, String>
CreateAuthRecord: the credential for a session token. Profile and status are
best-effort; the file name never takes path components from upstream values.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DevinAuth
impl !UnwindSafe for DevinAuth
impl Forget for DevinAuth
impl Freeze for DevinAuth
impl Move for DevinAuth
impl Send for DevinAuth
impl Sync for DevinAuth
impl Unpin for DevinAuth
impl UnsafeUnpin for DevinAuth
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more