pub struct UpstreamOauthCredentialRow {
pub upstream_name: String,
pub subject: String,
pub client_id: String,
pub granted_scopes_json: String,
pub token_blob: Vec<u8>,
pub token_blob_nonce: Vec<u8>,
pub token_received_at: i64,
pub access_token_expires_at: i64,
pub refresh_token_present: bool,
}Expand description
Persisted upstream OAuth credential row.
The encrypted token_blob is chacha20poly1305(token_response_json) sealed with a
fresh 12-byte nonce per write. access_token_expires_at is denormalized for cheap
pruning in cleanup_expired. refresh_token_present enables dropping access-only
stale rows while keeping rows that still have a refresh token for re-use (SEC-9).
Debug is implemented manually with redaction — never derive it.
Fields§
§upstream_name: String§subject: String§client_id: String§granted_scopes_json: String§token_blob: Vec<u8>§token_blob_nonce: Vec<u8>§token_received_at: i64§access_token_expires_at: i64§refresh_token_present: boolTrait Implementations§
Source§impl Clone for UpstreamOauthCredentialRow
impl Clone for UpstreamOauthCredentialRow
Source§fn clone(&self) -> UpstreamOauthCredentialRow
fn clone(&self) -> UpstreamOauthCredentialRow
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 UpstreamOauthCredentialRow
impl RefUnwindSafe for UpstreamOauthCredentialRow
impl Send for UpstreamOauthCredentialRow
impl Sync for UpstreamOauthCredentialRow
impl Unpin for UpstreamOauthCredentialRow
impl UnsafeUnpin for UpstreamOauthCredentialRow
impl UnwindSafe for UpstreamOauthCredentialRow
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