branch bow-v2-go updated (bd0c241 -> d746491)
This is an automated email from the git hooks/post-receive script. New change to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git from bd0c241 refactoring du token JWT pour stocker de l'info necessaire au serveur utilisation d'un BowUser pas seulement de son ID utilisation de query partout ou c'est possible exclusion des route 'auth' du check d'authentification new d746491 amélriation de l'exclusion de endpoint du filtre d'auth The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit d746491f40711936563ba1b7bc902d4eb6bce4c6 Author: Benjamin <poussin@codelutin.com> Date: Fri Apr 17 08:08:57 2020 +0200 amélriation de l'exclusion de endpoint du filtre d'auth Summary of changes: pkg/http/router.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit d746491f40711936563ba1b7bc902d4eb6bce4c6 Author: Benjamin <poussin@codelutin.com> Date: Fri Apr 17 08:08:57 2020 +0200 amélriation de l'exclusion de endpoint du filtre d'auth --- pkg/http/router.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/http/router.go b/pkg/http/router.go index ab3f655..8eb71c4 100644 --- a/pkg/http/router.go +++ b/pkg/http/router.go @@ -96,9 +96,16 @@ func cors(next http.Handler) http.Handler { }) } +func withoutAuthenticationEndpoint(r *http.Request) bool { + result := strings.HasSuffix(r.URL.Path, "/auth") || // no auth to create/delete auth + strings.HasSuffix(r.URL.Path, "/system/liveness") || // no auth to test if server is up + strings.HasSuffix(r.URL.Path, "/users") // no auth for creation of user + return result +} + func authentication(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if strings.HasSuffix(r.URL.Path, "/auth") { + if withoutAuthenticationEndpoint(r) { next.ServeHTTP(w, r) return } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm