Documentation ¶
Overview ¶
Package security implements a mechanism which is described here: https://www.filestack.com/docs/security/policies/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeSignature ¶
EncodeSignature converts Security to base64 encoded string.
Types ¶
type Policy ¶
type Policy struct { Call []string `json:"call,omitempty"` Container string `json:"container,omitempty"` Expiry int64 `json:"expiry"` Handle string `json:"handle,omitempty"` MaxSize int64 `json:"maxSize,omitempty"` MinSize int64 `json:"minSize,omitempty"` Path string `json:"path,omitempty"` URL string `json:"url,omitempty"` }
Policy determines which actions are authorized.
func (*Policy) EncodeToB64 ¶
EncodeToB64 encodes policy string to base64 format.
type Security ¶
Security is used for requests authentication.
func NewSecurity ¶
NewSecurity creates a new Security based on your secret and policy. Both values can be obtained from dev portal.
Click to show internal directories.
Click to hide internal directories.