Skip to content

Commit

Permalink
Fix: XSRFIgnoreMethods field not applied during service init
Browse files Browse the repository at this point in the history
  • Loading branch information
minchik committed Nov 4, 2024
1 parent 78537e6 commit 52e2dd5
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 52e2dd5

Please sign in to comment.