% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/auth.R
\name{validate_token}
\alias{validate_token}
\title{Validate a JWT token}
\usage{
validate_token(
  token,
  issuer,
  client_id,
  allowed_emails = NULL,
  allowed_domains = NULL,
  custom_validator = NULL
)
}
\arguments{
\item{token}{Character string, the JWT.}

\item{issuer}{Expected issuer URL.}

\item{client_id}{Expected audience (client ID).}

\item{allowed_emails}{Character vector of allowed email addresses (optional).}

\item{allowed_domains}{Character vector of allowed email domains (optional).}

\item{custom_validator}{Function(claims) returning TRUE/FALSE (optional).}
}
\value{
List with \code{valid} (logical), \code{email} (character or NULL),
\code{error} (character or NULL).
}
\description{
Verifies a JWT locally using the issuer's public keys (JWKS) and validates
standard OIDC claims.
}
\keyword{internal}
