justtrackio / gosoline

Gosoline is our framework which fuels all of our Golang applications
MIT License
93 stars 50 forks source link

httpserver: fixes httpserver jwt auth #1085

Closed j4k4 closed 8 months ago

j4k4 commented 8 months ago

This release fixes an issue with configuring JWT auth handlers on http servers.
The signature updates from:

func NewJWTAuthAuthenticator(config cfg.Config) Authenticator

to

func NewJWTAuthAuthenticator(config cfg.Config, name string) Authenticator

The name corresponds to the httpserver in the config. With this one can configure different JWT auth handlers for each http server.

httpserver:
  default:
    auth:
      jwt:
        signingSecret: 4812bd82-2e5b-4c8a-8559-eee08b03fea9
        issuer: justtrack