pub struct OAuthTokenConversion { /* private fields */ }Expand description
Prepared row conversion. All encrypted fields authenticated before this value exists. Keep it private; the ID token may be plaintext.
Implementations§
Source§impl OAuthTokenConversion
impl OAuthTokenConversion
Sourcepub fn prepare(
manifest: TrustedOAuthTokenManifest,
original_secret: &str,
destination: &AuthConfig,
) -> AuthResult<Self>
pub fn prepare( manifest: TrustedOAuthTokenManifest, original_secret: &str, destination: &AuthConfig, ) -> AuthResult<Self>
Authenticate every encrypted field and prepare Source-compatible values. Plain access/refresh values become encrypted; plain ID values remain plain. Requires encryption enabled in the destination runtime configuration.
§Errors
Wrong key, tamper, invalid UTF-8, NULL/classification disagreement or an encrypted Source ID token rejects the entire row without writing anything.
Sourcepub async fn apply<S: AuthSchema>(
&self,
store: &impl OAuthTokenConversionStore<S>,
) -> AuthResult<bool>
pub async fn apply<S: AuthSchema>( &self, store: &impl OAuthTokenConversionStore<S>, ) -> AuthResult<bool>
Apply one atomic row CAS through a physical adapter. false means the row
changed or disappeared. Repeating the same plan cannot overwrite a refresh
or reassignment. A storage failure may be retried with this same plan.
§Errors
Returns adapter errors; no token subset is committed.