Roverr / rtsp-stream

Out of box solution for RTSP - HLS live stream transcoding. Makes RTSP easy to play in browsers.
MIT License
713 stars 166 forks source link

Add JWT StandardClaim validation #69

Closed jmteachw closed 3 years ago

jmteachw commented 3 years ago

This will add basic JWT validation, specifically it will validate the standard time-based claims "exp, iat, nbf". If any of these claims are not present, the token will still be considered valid. As a result, this shouldn't break any minimalist or non-standard implementations of JWT, while still enabling basic JWT auth validation based on standard claim implementations.

See https://pkg.go.dev/github.com/dgrijalva/jwt-go#StandardClaims.Valid

Also used in an example https://pkg.go.dev/github.com/dgrijalva/jwt-go#example-ParseWithClaims-CustomClaimsType

jmteachw commented 3 years ago

I'm killing my fork, so in turn closing this pr