Skip to content

Commit

Permalink
fix: expose Enabled field in Client struct (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrynenko authored Dec 10, 2024
1 parent 7594d98 commit 5ef5d1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/auth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions pkg/auth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 5ef5d1c

Please sign in to comment.