pub struct OpenRouterOAuth {
pub authorize_url: String,
pub token_url: String,
}Expand description
The OpenRouter sign-in and its endpoints.
Fields§
Authorization page.
token_url: StringKey exchange endpoint.
Trait Implementations§
Source§impl Clone for OpenRouterOAuth
impl Clone for OpenRouterOAuth
Source§impl Debug for OpenRouterOAuth
impl Debug for OpenRouterOAuth
Source§impl Default for OpenRouterOAuth
impl Default for OpenRouterOAuth
Source§fn default() -> OpenRouterOAuth
fn default() -> OpenRouterOAuth
Returns the “default value” for a type. Read more
Source§impl OAuthProvider for OpenRouterOAuth
impl OAuthProvider for OpenRouterOAuth
Source§fn login_label(&self) -> Option<&str>
fn login_label(&self) -> Option<&str>
Label of the login menu entry, when the provider sets one.
Source§fn is_subscription(&self) -> bool
fn is_subscription(&self) -> bool
Whether the account is a subscription, which the login menu labels.
Source§fn login<'a>(
&'a self,
interaction: &'a Interaction,
_options: &'a LoginOptions,
) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
fn login<'a>( &'a self, interaction: &'a Interaction, _options: &'a LoginOptions, ) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
Runs the sign-in.
Source§fn refresh<'a>(
&'a self,
credential: &'a OAuthCredential,
_cancel: &'a CancellationToken,
) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
fn refresh<'a>( &'a self, credential: &'a OAuthCredential, _cancel: &'a CancellationToken, ) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
Exchanges the refresh token for a new credential.
Auto Trait Implementations§
impl Forget for OpenRouterOAuth
impl Freeze for OpenRouterOAuth
impl RefUnwindSafe for OpenRouterOAuth
impl Send for OpenRouterOAuth
impl Sync for OpenRouterOAuth
impl Unpin for OpenRouterOAuth
impl UnsafeUnpin for OpenRouterOAuth
impl UnwindSafe for OpenRouterOAuth
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