/**
 * EN: OIDC-related type definitions
 * VI: Định nghĩa các kiểu dữ liệu liên quan đến OIDC
 */

/**
 * EN: OIDC Discovery Document interface
 * VI: Interface cho tài liệu khám phá OIDC
 */
export interface OIDCDiscoveryDocument {
  issuer: string;
  authorization_endpoint: string;
  token_endpoint: string;
  userinfo_endpoint: string;
  jwks_uri: string;
  scopes_supported: string[];
  response_types_supported: string[];
  grant_types_supported: string[];
  subject_types_supported: string[];
  id_token_signing_alg_values_supported: string[];
  token_endpoint_auth_methods_supported: string[];
}

/**
 * EN: JWKS Key interface
 * VI: Interface cho khóa JWKS
 */
export interface JWKSKey {
  kty: string;
  use: string;
  kid: string;
  n?: string; // RSA modulus
  e?: string; // RSA exponent
  x?: string; // EC x coordinate
  y?: string; // EC y coordinate
}

/**
 * EN: JWKS Response interface
 * VI: Interface cho phản hồi JWKS
 */
export interface JWKSResponse {
  keys: JWKSKey[];
}

/**
 * EN: OIDC Token Exchange Response interface
 * VI: Interface cho phản hồi trao đổi token OIDC
 */
export interface OIDCTokenExchangeResponse {
  access_token: string;
  refresh_token: string;
  id_token: string;
  token_type: string;
  expires_in: number;
}
