GoodMemGoodMem
ReferenceSdkRustTypes

ApiKeyAuth

Rust struct goodmem::models::ApiKeyAuth: declaration, fields or variants, and implementations.

All types

Struct ApiKeyAuth

goodmem::models::ApiKeyAuth

Configuration for classic API-key authentication.

pub struct ApiKeyAuth {
    pub inline_secret: Option<String>,
    pub secret_ref: Option<Box<SecretReference>>,
    pub header_name: Option<String>,
    pub prefix: Option<String>,
}

Referenced types: SecretReference.

Fields

inline_secret

pub inline_secret: Option<String>

Secret stored directly in GoodMem (mutually exclusive with secretRef) Wire name: inlineSecret.

secret_ref

pub secret_ref: Option<Box<SecretReference>>

Reference to an external secret manager entry (mutually exclusive with inlineSecret) Wire name: secretRef.

header_name

pub header_name: Option<String>

Desired HTTP header to carry the credential (defaults to Authorization) Wire name: headerName.

prefix

pub prefix: Option<String>

Optional prefix prepended to the secret (e.g., "Bearer ") Wire name: prefix.

Implementations

validate

pub fn validate(&self) -> crate::Result<()>

Validate the request before sending, without making an HTTP call.

Trait implementations

  • Clone (derived)
  • Default (derived)
  • PartialEq (derived)
  • Serialize (derived)
  • impl<'de> Deserialize<'de> for ApiKeyAuth
  • impl std::fmt::Debug for ApiKeyAuth

On this page