AuthCodeData (user/oidc.rs)

hyperswitch · crates/router/src/types/domain/user/oidc.rs · rust · Apache-2.0
auth, tag:embed-classified

OIDC authentication data structures for auth codes, ID tokens, and access tokens.

// Source: https://github.com/juspay/hyperswitch | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
use api_models::oidc::Scope;
use common_utils::pii;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AuthCodeData {
    pub sub: String,
    pub client_id: String,
    pub redirect_uri: String,
    pub scope: Vec<Scope>,
    pub nonce: String,
    pub email: pii::Email,
    pub is_verified: bool,
}

/// ID Token Claims structure for OIDC
#[derive(Debug, Serialize, Deserialize)]
pub struct IdTokenClaims {
    pub iss: String,
    pub sub: String,
    pub aud: String,
    pub iat: u64,
    pub exp: u64,
    #[serde(skip_serializing_if = "Op

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key