Documentation
¶
Index ¶
Constants ¶
View Source
const ( // WebUsage used for the uid WebUsage = "web" // StorageUsage for file retrieval StorageUsage = "storage" // APIUSage for the device api APIUSage = "api" )
Variables ¶
This section is empty.
Functions ¶
func ClaimsFromToken ¶
ClaimsFromToken parses the claims from the token
Types ¶
type Auth0profile ¶
type Auth0profile struct {
UserID string `json:"UserID"`
IsSocial bool
ClientID string `json:"ClientID"`
Connection string
Name string `json:"Name"`
Nickname string `json:"NickName"`
GivenName string
FamilyName string
Email string
EmailVerified bool
Picture string
CreatedAt time.Time
UpdatedAt time.Time
}
Auth0profile is the oauth user struct.
type CodeConnector ¶
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
type DeviceClaims ¶
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 StorageClaim ¶
type StorageClaim struct {
DocumentID string `json:"documentId"`
UserID string `json:"userId"`
jwt.StandardClaims
}
StorageClaim used for file retrieval
type UserClaims ¶
type UserClaims struct {
Profile Auth0profile `json:"auth0-profile,omitempty"`
DeviceDesc string `json:"device-desc"`
DeviceID string `json:"device-id"`
Scopes string `json:"scopes,omitempty"`
jwt.StandardClaims
}
UserClaims is the oauth token struct.
type WebUserClaims ¶
type WebUserClaims struct {
UserID string `json:"UserID"`
Email string
Scopes string `json:"scopes,omitempty"`
Roles []string
jwt.StandardClaims
}
WebUserClaims the claims
Click to show internal directories.
Click to hide internal directories.