Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultValidity = time.Hour * 24 * 7
DefaultValidity TODO: adjust
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChallengeInformation ¶
type ChallengeInformation struct {
Name string `json:"name"`
Key []byte `json:"key"`
Result []byte `json:"result"`
Expiry *jwt.NumericDate `json:"exp,omitempty"`
NotBefore *jwt.NumericDate `json:"nbf,omitempty"`
IssuedAt *jwt.NumericDate `json:"iat,omitempty"`
}
type RequestData ¶
type RequestData struct {
Id [16]byte
Expires time.Time
Challenges map[challenge.Id]challenge.VerifyResult
}
func RequestDataFromContext ¶
func RequestDataFromContext(ctx context.Context) *RequestData
func (*RequestData) HasValidChallenge ¶
func (d *RequestData) HasValidChallenge(id challenge.Id) bool
type State ¶
type State struct {
Client *http.Client
Settings StateSettings
UrlPath string
Mux *http.ServeMux
Networks map[string]cidranger.Ranger
Wasm *wasm.Runner
Challenges map[challenge.Id]challenge.Challenge
RulesEnv *cel.Env
Rules []RuleState
Poison map[string][]byte
// contains filtered or unexported fields
}
func (*State) GetChallengeByName ¶
func (*State) GetChallengeKeyForRequest ¶
Click to show internal directories.
Click to hide internal directories.