Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAuth = fmt.Errorf("no authorization header found")
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { NoRateLimit bool `json:"no_rate_limit,omitempty"` RateLimitPerSecond uint64 `json:"rate_limit_per_second,omitempty"` NoAllowlist bool `json:"no_allowlist,omitempty"` NoBlock bool `json:"no_block,omitempty"` AllowTagsList bool `json:"allow_tags_list,omitempty"` BlobsURL string `json:"blobs_url,omitempty"` Block bool `json:"block,omitempty"` BlockMessage string `json:"block_message,omitempty"` }
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator( tokenDecoder *Decoder, tokenURL string, ) *Authenticator
func (*Authenticator) Authenticate ¶
func (c *Authenticator) Authenticate(rw http.ResponseWriter, r *http.Request)
func (*Authenticator) Authorization ¶
func (c *Authenticator) Authorization(r *http.Request) (Token, error)
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
type Token ¶
type Token struct { ExpiresAt time.Time `json:"expires_at,omitempty"` Scope string `json:"scope,omitempty"` Service string `json:"service,omitempty"` Account string `json:"account,omitempty"` Image string `json:"image,omitempty"` IP string `json:"ip,omitempty"` Attribute `json:"attribute,omitempty"` }
Click to show internal directories.
Click to hide internal directories.