feat(lib): add (*TraefikOidc).Ready() metadata-discovery readiness accessor

This commit is contained in:
2026-05-19 13:19:20 +01:00
parent 46777d0510
commit ded90e5dc1
2 changed files with 31 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
package traefikoidc
// Ready reports whether the middleware has completed at least one successful
// OIDC provider metadata discovery. Used by external supervisors (e.g. the
// oidcgate /readyz endpoint) to gate traffic until the IdP discovery doc
// has been fetched and the authorization endpoint is known.
func (t *TraefikOidc) Ready() bool {
t.metadataMu.RLock()
defer t.metadataMu.RUnlock()
return t.authURL != ""
}