Documentation
¶
Index ¶
Constants ¶
View Source
const ( TOKEN_DURATION_KEY = "tokenduration" TP_SESSION_TOKEN = "x-tidepool-session-token" // TP_TRACE_SESSION Session trace: uuid v4 TP_TRACE_SESSION = "x-tidepool-trace-session" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type SessionToken ¶
type SessionToken struct {
ID string `json:"-" bson:"_id"`
IsServer bool `json:"isServer" bson:"isServer"`
ServerID string `json:"-" bson:"serverId,omitempty"`
UserID string `json:"userId,omitempty" bson:"userId,omitempty"`
Duration int64 `json:"-" bson:"duration"`
ExpiresAt int64 `json:"-" bson:"expiresAt"`
CreatedAt int64 `json:"-" bson:"createdAt"`
Time int64 `json:"-" bson:"time"`
}
func CreateSessionToken ¶
func CreateSessionToken(data *TokenData, config TokenConfig) (*SessionToken, error)
type TokenConfig ¶
Click to show internal directories.
Click to hide internal directories.