// oidcAddRoutes adds OpenID Connect endpoints to an existing gin.IRouter. func oidcAddRoutes(router gin.IRouter, origin string, rsakey *rsa.PrivateKey) { jwksPath := "/jwks.json" authPath := "/authorize" router.GET("/.well-known/openid-configuration", discovery(origin, jwksPath, authPath)) router.GET(jwksPath, keyset(&rsakey.PublicKey)) router.POST(authPath, authorize(origin, rsakey)) }