Documentation
¶
Index ¶
Constants ¶
View Source
const (
// APIUsage for the device api
APIUsage = "api"
)
View Source
const RmFileHeader = "rm-filename"
View Source
const RmTokenTtlHeader = "Rm-Token-Ttl-Hint"
View Source
const RootHash = "root"
View Source
const SchemaVersion = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth0profile ¶ added in v0.0.5
type Auth0profile struct {
UserID string `json:"UserID"`
IsSocial bool
ClientID string `json:"ClientID,omitempty"`
Connection string
Name string `json:"Name"`
Nickname string `json:"NickName"`
GivenName string
FamilyName string
Email string
EmailVerified bool
Picture string `json:"Picture,omitempty"`
CreatedAt time.Time
UpdatedAt time.Time
}
Auth0profile is the oauth user struct.
type CodeConnector ¶ added in v0.0.5
type CodeConnector interface {
//NewCode generates one time code for a user
NewCode(uid string) (code string, err error)
//ConsumeCode a code and returns the uid if ofound
ConsumeCode(code string) (uid string, err error)
}
CodeConnector matches a code to users
func NewCodeConnector ¶ added in v0.0.4
func NewCodeConnector() CodeConnector
NewCodeConnector constructor
type DeviceClaims ¶ added in v0.0.5
type DeviceClaims struct {
UserID string `json:"auth0-userid"`
DeviceDesc string `json:"device-desc"`
DeviceID string `json:"device-id"`
Scopes string `json:"scopes,omitempty"`
jwt.StandardClaims
}
DeviceClaims device
type UserClaims ¶ added in v0.0.5
type UserClaims struct {
Profile Auth0profile `json:"auth0-profile,omitempty"`
DeviceDesc string `json:"device-desc"`
DeviceID string `json:"device-id"`
Scopes string `json:"scopes,omitempty"`
Version int `json:"version"`
Level string `json:"level"`
Tectonic string `json:"tectonic"`
jwt.StandardClaims
}
UserClaims is the oauth token struct.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.