Skip to main content

OauthPack

Struct OauthPack 

Source
pub struct OauthPack {
Show 26 fields pub token_url: String, pub token_url_fallback: Option<String>, pub authorize_url: Option<String>, pub authorize_params: BTreeMap<String, String>, pub device_auth_url: Option<String>, pub client_id: Option<String>, pub redirect_uri: Option<String>, pub scopes: Vec<String>, pub list_merge: ListMerge, pub pkce: Option<bool>, pub refresh_grant: Option<String>, pub refresh_body: BTreeMap<String, String>, pub token_request_format: Option<TokenRequestFormat>, pub token_headers: BTreeMap<String, String>, pub creds_path: Option<String>, pub creds_format: Option<CredsFormat>, pub access_token_ptr: Option<String>, pub refresh_token_ptr: Option<String>, pub expires_ptr: Option<String>, pub expires_unit: Option<ExpiresUnit>, pub access_env: Option<String>, pub login: Option<Login>, pub setup_token_hint: Option<String>, pub keychain_service: Option<String>, pub keychain_accounts: Vec<String>, pub token_response: Option<TokenResponse>,
}
Expand description

The [oauth] table: token POST and login surface.

Fields§

§token_url: String

Token endpoint. Required when [oauth] is present.

§token_url_fallback: Option<String>

Used only on HTTP 404 from token_url.

§authorize_url: Option<String>

Authorize URL. Absent means no login in this profile.

§authorize_params: BTreeMap<String, String>

Extra authorize query parameters.

§device_auth_url: Option<String>

Device-flow endpoint.

§client_id: Option<String>

Public client id. May be empty; login then exits 2.

§redirect_uri: Option<String>

PKCE loopback redirect.

§scopes: Vec<String>

OAuth scopes.

§list_merge: ListMerge

Merge policy for scopes.

§pkce: Option<bool>

PKCE flag. Default true when authorize_url is set.

§refresh_grant: Option<String>

grant_type when refresh_body omits it.

§refresh_body: BTreeMap<String, String>

Extra token-POST body fields (data only).

§token_request_format: Option<TokenRequestFormat>

Token POST encoding.

§token_headers: BTreeMap<String, String>

Headers on the token POST only.

§creds_path: Option<String>

Credential store path (~ and {env:} allowed).

§creds_format: Option<CredsFormat>

How to read/write the credential store.

§access_token_ptr: Option<String>

JSON Pointer into the store for the access token.

§refresh_token_ptr: Option<String>

JSON Pointer into the store for the refresh token.

§expires_ptr: Option<String>

JSON Pointer into the store for expiry.

§expires_unit: Option<ExpiresUnit>

Unit of the store expiry field.

§access_env: Option<String>

Env fallback for the access token.

§login: Option<Login>

Login mode.

§setup_token_hint: Option<String>

Free text printed for login = "setup-token". Backticks allowed.

§keychain_service: Option<String>

Optional macOS keychain service.

§keychain_accounts: Vec<String>

Optional keychain account names.

§token_response: Option<TokenResponse>

Pointers into the HTTP refresh response (not the store).

Trait Implementations§

Source§

impl Clone for OauthPack

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OauthPack

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for OauthPack

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OauthPack

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more