Skip to content

Commit a209d14

Browse files
authored
better error message for invalid connection token with channel claim (#780)
1 parent f645fb8 commit a209d14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/jwtverify/token_verifier_jwt.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@ func (verifier *VerifierJWT) VerifyConnectToken(t string, skipVerify bool) (Conn
463463
}
464464

465465
if claims.Channel != "" {
466-
return ConnectToken{}, ErrInvalidToken
466+
return ConnectToken{}, fmt.Errorf(
467+
"%w: connection JWT can not contain channel claim, only subscription JWT can", ErrInvalidToken)
467468
}
468469

469470
now := time.Now()

0 commit comments

Comments
 (0)