From 52e2dd579a1f059e6e9f4e3edaa3f5ce2aa9c351 Mon Sep 17 00:00:00 2001 From: minchik Date: Mon, 4 Nov 2024 11:49:56 +0200 Subject: [PATCH] Fix: XSRFIgnoreMethods field not applied during service init --- auth.go | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/auth.go b/auth.go index 33366b20..4530691c 100644 --- a/auth.go +++ b/auth.go @@ -99,24 +99,25 @@ func NewService(opts Opts) (res *Service) { } jwtService := token.NewService(token.Opts{ - SecretReader: opts.SecretReader, - ClaimsUpd: opts.ClaimsUpd, - SecureCookies: opts.SecureCookies, - TokenDuration: opts.TokenDuration, - CookieDuration: opts.CookieDuration, - DisableXSRF: opts.DisableXSRF, - DisableIAT: opts.DisableIAT, - JWTCookieName: opts.JWTCookieName, - JWTCookieDomain: opts.JWTCookieDomain, - JWTHeaderKey: opts.JWTHeaderKey, - XSRFCookieName: opts.XSRFCookieName, - XSRFHeaderKey: opts.XSRFHeaderKey, - SendJWTHeader: opts.SendJWTHeader, - JWTQuery: opts.JWTQuery, - Issuer: res.issuer, - AudienceReader: opts.AudienceReader, - AudSecrets: opts.AudSecrets, - SameSite: opts.SameSiteCookie, + SecretReader: opts.SecretReader, + ClaimsUpd: opts.ClaimsUpd, + SecureCookies: opts.SecureCookies, + TokenDuration: opts.TokenDuration, + CookieDuration: opts.CookieDuration, + DisableXSRF: opts.DisableXSRF, + DisableIAT: opts.DisableIAT, + JWTCookieName: opts.JWTCookieName, + JWTCookieDomain: opts.JWTCookieDomain, + JWTHeaderKey: opts.JWTHeaderKey, + XSRFCookieName: opts.XSRFCookieName, + XSRFHeaderKey: opts.XSRFHeaderKey, + XSRFIgnoreMethods: opts.XSRFIgnoreMethods, + SendJWTHeader: opts.SendJWTHeader, + JWTQuery: opts.JWTQuery, + Issuer: res.issuer, + AudienceReader: opts.AudienceReader, + AudSecrets: opts.AudSecrets, + SameSite: opts.SameSiteCookie, }) if opts.SecretReader == nil {