use super::handlers;
use crate::server::state::AppState;
use axum::{
routing::{get, post},
Router,
};
pub fn oauth_routes() -> Router<AppState> {
Router::new()
.route(
"/oidc/{project}/{extension}/authorize",
get(handlers::authorize),
)
.route(
"/oidc/{project}/{extension}/callback",
get(handlers::callback),
)
.route(
"/oidc/{project}/{extension}/token",
post(handlers::token_endpoint).options(handlers::token_endpoint_options),
)
.route(
"/oidc/{project}/{extension}/.well-known/openid-configuration",
get(handlers::oidc_discovery),
)
.route("/oidc/{project}/{extension}/jwks", get(handlers::oidc_jwks))
}