Skip to content

Commit

Permalink
Update forward.go
Browse files Browse the repository at this point in the history
  • Loading branch information
emberfarkas committed Nov 21, 2023
1 parent d12beb0 commit 2cdb9dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/forwardauth/forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func IsTokenNull(err error) bool {
func Server() middleware.Middleware {
return func(handler middleware.Handler) middleware.Handler {
return func(ctx context.Context, req interface{}) (reply interface{}, err error) {
if info, ok := transport.FromServerContext(ctx); ok {
if info, ok := transport.FromServerContext(ctx); ok && info.Operation() == ssopb.OperationSysAuth {
token := extractToken(info)
if len(token) == 0 {
err = TokenNull("token is null")
Expand Down

0 comments on commit 2cdb9dc

Please sign in to comment.