Documentation ¶ Index ¶ Constants func Authorize(r *http.Request) (string, error) type Token Constants ¶ View Source const ( // TokenMaxDuration specifies the lifetime for each access token. TokenMaxDuration int64 = 86400 * 1e3 // Milliseconds ) Variables ¶ This section is empty. Functions ¶ func Authorize ¶ func Authorize(r *http.Request) (string, error) Authorize extracts the authorize token from the HTTP request and verify if the token is valid or not. It returns the clientID if the token is valid, otherwise, an empty string will be returned. Types ¶ type Token ¶ type Token struct { TimestampHex string SignedTimestampHex string PublicKeyHex string } Token represents the values we have in access tokens. Source Files ¶ View all Source files auth.go Directories ¶ Show internal Expand all Path Synopsis authtest Click to show internal directories. Click to hide internal directories.