Documentation
¶
Overview ¶
Package authorizeerr keeps the in-memory rules that make /authorize fail on purpose: a rule with an optional match on the /authorize query returns an OAuth error to the redirect_uri instead of logging the user in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
Validate rejects rules that cannot be put in a redirect Location safely. Both fields are limited to the printable ASCII OAuth permits in error values (RFC 6749 section 4.1.2.1): no quote, backslash, control or non-ASCII characters.
Types ¶
type Rule ¶
type Rule struct {
ID string `json:"id"`
Match map[string]string `json:"match,omitempty"`
Error string `json:"error"`
ErrorDescription string `json:"error_description,omitempty"`
}
Rule is one registered authorize failure.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a mutex-guarded rule registry.
func (*Store) Add ¶
Add stores a copy of r under a fresh ID (any inbound ID is overwritten) and returns the stored copy.
Click to show internal directories.
Click to hide internal directories.