pub struct OidcMachineIdentityConfig {
pub issuer: String,
pub audience: String,
pub platform: String,
}Expand description
Configuration for creating a machine identity from an OIDC token.
§Usage
ⓘ
use auths_sdk::workflows::machine_identity::{OidcMachineIdentityConfig, create_machine_identity_from_oidc_token};
use chrono::Utc;
let config = OidcMachineIdentityConfig {
issuer: "https://token.actions.githubusercontent.com".to_string(),
audience: "sigstore".to_string(),
platform: "github".to_string(),
};
let identity = create_machine_identity_from_oidc_token(
token,
config,
jwt_validator,
jwks_client,
timestamp_client,
Utc::now(),
).await?;Fields§
§issuer: StringOIDC issuer URL
audience: StringExpected audience
platform: StringCI platform name (github, gitlab, circleci)
Trait Implementations§
Source§impl Clone for OidcMachineIdentityConfig
impl Clone for OidcMachineIdentityConfig
Source§fn clone(&self) -> OidcMachineIdentityConfig
fn clone(&self) -> OidcMachineIdentityConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OidcMachineIdentityConfig
impl RefUnwindSafe for OidcMachineIdentityConfig
impl Send for OidcMachineIdentityConfig
impl Sync for OidcMachineIdentityConfig
impl Unpin for OidcMachineIdentityConfig
impl UnsafeUnpin for OidcMachineIdentityConfig
impl UnwindSafe for OidcMachineIdentityConfig
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