Documentation
¶
Overview ¶
Package jwt implements a Hook that fails an Announce if the client's request is missing a valid JSON Web Token.
JWTs are validated against the standard claims in RFC7519 along with an extra "infohash" claim that verifies the client has access to the Swarm. RS256 keys are asychronously rotated from a provided JWK Set HTTP endpoint.
Index ¶
Constants ¶
View Source
const Name = "jwt"
Name is the name by which this middleware is registered with Chihaya.
Variables ¶
View Source
var ( // ErrMissingJWT is returned when a JWT is missing from a request. ErrMissingJWT = bittorrent.ClientError("unapproved request: missing jwt") // ErrInvalidJWT is returned when a JWT fails to verify. ErrInvalidJWT = bittorrent.ClientError("unapproved request: invalid jwt") )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.