replacement for TokenInfo endpoint

This commit is contained in:
Roman Perekhod
2024-05-21 09:51:25 +02:00
committed by Ralf Haferkamp
parent 2c10c48e3a
commit c7281599d4
7 changed files with 246 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ type BasicAuthenticator struct {
// Authenticate implements the authenticator interface to authenticate requests via basic auth.
func (m BasicAuthenticator) Authenticate(r *http.Request) (*http.Request, bool) {
if isPublicPath(r.URL.Path) {
if isPublicPath(r.URL.Path) && isPublicWithShareToken(r) {
// The authentication of public path requests is handled by another authenticator.
// Since we can't guarantee the order of execution of the authenticators, we better
// implement an early return here for paths we can't authenticate in this authenticator.