Skip to content

Commit a7b8b44

Browse files
weltekialexellis
authored andcommitted
Move JWT auth middleware to faas-middleware package
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent 841d15b commit a7b8b44

File tree

9 files changed

+362
-494
lines changed

9 files changed

+362
-494
lines changed

config/config.go

+9
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ type WatchdogConfig struct {
5757
// using the OpenFaaS gateway as the issuer.
5858
JWTAuthentication bool
5959

60+
// JWTAuthDebug enables debug logging for the JWT authentication middleware.
61+
JWTAuthDebug bool
62+
63+
// JWTAuthLocal indicates wether the JWT authentication middleware should use a port-forwarded or
64+
// local gateway running at `http://127.0.0.1:8000` instead of attempting to reach it via an in-cluster service
65+
JWTAuthLocal bool
66+
6067
// LogCallId includes a prefix of the X-Call-Id in any log statements in
6168
// HTTP mode.
6269
LogCallId bool
@@ -178,6 +185,8 @@ func New(env []string) (WatchdogConfig, error) {
178185
}
179186

180187
c.JWTAuthentication = getBool(envMap, "jwt_auth")
188+
c.JWTAuthDebug = getBool(envMap, "jwt_auth_debug")
189+
c.JWTAuthLocal = getBool(envMap, "jwt_auth_local")
181190

182191
return c, nil
183192
}

executor/jwt_authenticator.go

-300
This file was deleted.

0 commit comments

Comments
 (0)