pub struct OidcAuthProvider { /* private fields */ }Expand description
Authenticates a workload with a token from any OpenID Connect issuer, read from
SPIRAL_OIDC_PROVIDER_TOKEN, as a JWT-bearer grant at the authorization server. The
token’s audience must be the authorization server’s token endpoint.
Implementations§
Source§impl OidcAuthProvider
impl OidcAuthProvider
Sourcepub fn new(
client: impl Into<Client>,
token_endpoint: Url,
workload_id: String,
) -> Self
pub fn new( client: impl Into<Client>, token_endpoint: Url, workload_id: String, ) -> Self
Obtain the workload’s tokens at token_endpoint, the authorization server’s.
Sourcepub fn with_assertion_provider(self, source: TokenSource) -> Self
pub fn with_assertion_provider(self, source: TokenSource) -> Self
Obtain a fresh platform assertion from this source before each exchange. Use the installation’s ID as the client ID when composing installation credentials.
Source§impl OidcAuthProvider
impl OidcAuthProvider
Sourcepub async fn token(&self) -> CredentialResult<Option<Token>>
pub async fn token(&self) -> CredentialResult<Option<Token>>
A usable token, or None when this provider has no credentials to offer.
Trait Implementations§
Source§impl Debug for OidcAuthProvider
impl Debug for OidcAuthProvider
Source§impl From<OidcAuthProvider> for TokenSource
impl From<OidcAuthProvider> for TokenSource
Source§fn from(provider: OidcAuthProvider) -> Self
fn from(provider: OidcAuthProvider) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for OidcAuthProvider
impl !UnwindSafe for OidcAuthProvider
impl Freeze for OidcAuthProvider
impl Send for OidcAuthProvider
impl Sync for OidcAuthProvider
impl Unpin for OidcAuthProvider
impl UnsafeUnpin for OidcAuthProvider
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