pub struct VeracodeCredentials { /* private fields */ }
Expand description
ARC-based credential storage for thread-safe access via memory pointers
This struct provides secure credential storage with the following protections:
- Fields are private to prevent direct access
- SecretString provides memory protection and debug redaction
- ARC allows safe sharing across threads
- Access is only possible through controlled expose_* methods
Implementations§
Source§impl VeracodeCredentials
impl VeracodeCredentials
Sourcepub fn api_id_ptr(&self) -> Arc<SecretString>
pub fn api_id_ptr(&self) -> Arc<SecretString>
Get API ID via memory pointer (ARC) - USE WITH CAUTION
§Security Warning
This returns an Arc<SecretString>
which allows the caller to call expose_secret().
Only use this method when you need to share credentials across thread boundaries.
For authentication, prefer using expose_api_id() directly.
Sourcepub fn api_key_ptr(&self) -> Arc<SecretString>
pub fn api_key_ptr(&self) -> Arc<SecretString>
Get API key via memory pointer (ARC) - USE WITH CAUTION
§Security Warning
This returns an Arc<SecretString>
which allows the caller to call expose_secret().
Only use this method when you need to share credentials across thread boundaries.
For authentication, prefer using expose_api_key() directly.
Sourcepub fn expose_api_id(&self) -> &str
pub fn expose_api_id(&self) -> &str
Access API ID securely (temporary access for authentication)
This is the preferred method for accessing the API ID during authentication. The returned reference is only valid for the lifetime of this call.
Sourcepub fn expose_api_key(&self) -> &str
pub fn expose_api_key(&self) -> &str
Access API key securely (temporary access for authentication)
This is the preferred method for accessing the API key during authentication. The returned reference is only valid for the lifetime of this call.
Trait Implementations§
Source§impl Clone for VeracodeCredentials
impl Clone for VeracodeCredentials
Source§fn clone(&self) -> VeracodeCredentials
fn clone(&self) -> VeracodeCredentials
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more