mirror of
https://github.com/openziti/zrok.git
synced 2026-09-24 23:49:44 -05:00
29 lines
519 B
Go
29 lines
519 B
Go
package publicProxy
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/golang-jwt/jwt/v5"
|
|
)
|
|
|
|
type authHandler struct {
|
|
cfg *Config
|
|
signingKey []byte
|
|
handler http.Handler
|
|
}
|
|
|
|
func newAuthHandler(cfg *Config, signingKey []byte, handler http.Handler) *authHandler {
|
|
return &authHandler{
|
|
cfg: cfg,
|
|
signingKey: signingKey,
|
|
handler: handler,
|
|
}
|
|
}
|
|
|
|
type IntermediateJWT struct {
|
|
State string `json:"st"`
|
|
TargetHost string `json:"th"`
|
|
RefreshInterval string `json:"rfi"`
|
|
jwt.RegisteredClaims
|
|
}
|