pub struct DefaultTokenSource { /* private fields */ }Expand description
The default resolution order, per profile:
- the
GITPOULPI_TOKEN_<ID>environment variable (one-off override, CI); - the token stored under the profile’s own
token_ref; - the system credential helper for the profile’s host - only when exactly one enabled profile has that host. With two profiles on one host (two GitHub users, say) the helper’s single per-host credential would silently authenticate one as the other.
SSH is deliberately absent: per ADR-0004 this crate never sees a private key; token auth is for the API.
Implementations§
Source§impl DefaultTokenSource
impl DefaultTokenSource
pub fn new( store: Box<dyn TokenStore + Send + Sync>, integrations: &[Integration], ) -> Self
Sourcepub fn for_integrations(integrations: &[Integration]) -> Self
pub fn for_integrations(integrations: &[Integration]) -> Self
The production wiring: the git credential helper as the store.
Trait Implementations§
Source§impl TokenSource for DefaultTokenSource
impl TokenSource for DefaultTokenSource
Auto Trait Implementations§
impl !RefUnwindSafe for DefaultTokenSource
impl !UnwindSafe for DefaultTokenSource
impl Forget for DefaultTokenSource
impl Freeze for DefaultTokenSource
impl Move for DefaultTokenSource
impl Send for DefaultTokenSource
impl Sync for DefaultTokenSource
impl Unpin for DefaultTokenSource
impl UnsafeUnpin for DefaultTokenSource
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