This commit is contained in:
Erikson Bahr 2024-02-01 09:56:38 -03:00
parent ac2d04686f
commit 0c8b7f9e33
No known key found for this signature in database
GPG Key ID: 18A31B1438D87934
1 changed files with 3 additions and 4 deletions

View File

@ -16,14 +16,14 @@ type CookieRefreshOptions struct {
func NewCookieRefresh(opts *CookieRefreshOptions) alice.Constructor {
cr := &cookieRefresh{
HttpClient: &http.Client{},
HTTPClient: &http.Client{},
IssuerURL: opts.IssuerURL,
}
return cr.refreshCookie
}
type cookieRefresh struct {
HttpClient *http.Client
HTTPClient *http.Client
IssuerURL string
}
@ -51,10 +51,9 @@ func (cr *cookieRefresh) refreshCookie(next http.Handler) http.Handler {
bodyString := string(resp.Body())
logger.Errorf("SSO Cookie Refresher - Could not refresh the 'hsdpamcookie' cookie due to status and content: %v - %v", resp.StatusCode(), bodyString)
return
} else {
logger.Print("SSO Cookie Refresher - Cookie 'hsdpamcookie' refreshed")
}
logger.Print("SSO Cookie Refresher - Cookie 'hsdpamcookie' refreshed")
next.ServeHTTP(rw, req)
})
}