#[non_exhaustive]pub struct AuthRequest {
pub audience: Option<String>,
pub scopes: Vec<String>,
pub resource: Option<String>,
pub actor: Option<String>,
}Expand description
Context for an authentication request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.audience: Option<String>Target audience (OIDC audience, API identifier).
scopes: Vec<String>Requested scopes (OIDC scopes, OAuth2 scopes).
resource: Option<String>Target resource identifier (e.g., Vault path, AWS region).
actor: Option<String>Actor identity for audit (workflow ID, agent ID).
Implementations§
Source§impl AuthRequest
impl AuthRequest
Sourcepub fn with_audience(self, audience: impl Into<String>) -> Self
pub fn with_audience(self, audience: impl Into<String>) -> Self
Set the target audience.
Sourcepub fn with_scope(self, scope: impl Into<String>) -> Self
pub fn with_scope(self, scope: impl Into<String>) -> Self
Add a scope.
Sourcepub fn with_resource(self, resource: impl Into<String>) -> Self
pub fn with_resource(self, resource: impl Into<String>) -> Self
Set the target resource.
Sourcepub fn with_actor(self, actor: impl Into<String>) -> Self
pub fn with_actor(self, actor: impl Into<String>) -> Self
Set the actor identity.
Trait Implementations§
Source§impl Clone for AuthRequest
impl Clone for AuthRequest
Source§fn clone(&self) -> AuthRequest
fn clone(&self) -> AuthRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthRequest
impl Debug for AuthRequest
Source§impl Default for AuthRequest
impl Default for AuthRequest
Source§fn default() -> AuthRequest
fn default() -> AuthRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AuthRequest
impl RefUnwindSafe for AuthRequest
impl Send for AuthRequest
impl Sync for AuthRequest
impl Unpin for AuthRequest
impl UnsafeUnpin for AuthRequest
impl UnwindSafe for AuthRequest
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