Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Scope for reading tokens ScopeRead = "github.com/mutablelogic/go-server/tokenauth:read" // Scope for updating, deleting and creating tokens ScopeWrite = "github.com/mutablelogic/go-server/tokenauth:write" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Token ¶
type Token struct {
Key string `json:"key,omitempty" bson:"_id,omitempty"` // Key
Name string `json:"name" bson:"name"` // Name of token
Type TokenType `json:"type" bson:"type"` // Type of token
Value string `json:"-" bson:"value"` // Token value
Expire time.Time `json:"expires_at,omitempty" bson:"expires_at,omitempty"` // Time of expiration for the token
Time time.Time `json:"access_at" bson:"access_at"` // Time of last access
Scope []string `json:"scope,omitempty" bson:"scope,omitempty"` // Authorization scopes
}
func (*Token) MarshalJSON ¶
type TokenUpdateExpiry ¶
type TokenUpdateScope ¶
type TokenUpdateTime ¶
Click to show internal directories.
Click to hide internal directories.