Skip to main content

validate_with_caller

Function validate_with_caller 

Source
pub fn validate_with_caller<F>(
    profile_id: &ProfileId,
    caller: F,
) -> Result<CallerIdentity, AppError>
Expand description

Pure validation logic for AWS profiles.

Accepts a caller closure that returns the STS result (or an error triple (status, code, message)). This makes the mapping logic testable without making any network call.

§Returns

  • Ok(CallerIdentity) on success.
  • Err(AppError) — the mapped error on failure.