From 5ef5d1ca7a7ffddd333b1c3411167be903760b94 Mon Sep 17 00:00:00 2001 From: Maksym Hrynenko <108219165+mhrynenko@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:57:22 +0200 Subject: [PATCH] fix: expose Enabled field in Client struct (#3) --- pkg/auth/client.go | 3 ++- pkg/auth/config.go | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/auth/client.go b/pkg/auth/client.go index 87a07ff..aa9eba6 100644 --- a/pkg/auth/client.go +++ b/pkg/auth/client.go @@ -17,7 +17,8 @@ const ( type Client struct { *http.Client - Addr string + Addr string + Enabled bool } func (a *Client) ValidateJWT(r *http.Request) (claims []resources.Claim, err error) { diff --git a/pkg/auth/config.go b/pkg/auth/config.go index 42a2490..6d6ed5c 100644 --- a/pkg/auth/config.go +++ b/pkg/auth/config.go @@ -43,8 +43,9 @@ func (c *auther) Auth() *Client { } return &Client{ - Client: &http.Client{}, - Addr: cfg.Addr, + Client: &http.Client{}, + Addr: cfg.Addr, + Enabled: cfg.Enabled, } }).(*Client) }