mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-14 04:07:46 +00:00
feat(lib): add (*TraefikOidc).Ready() metadata-discovery readiness accessor
This commit is contained in:
@@ -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 != ""
|
||||
}
|
||||
Reference in New Issue
Block a user