app

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIUsage for the device api
	APIUsage = "api"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App web app

func NewApp

func NewApp(cfg *config.Config) App

NewApp constructs an app

func (*App) MyEndpoint added in v0.0.13

func (app *App) MyEndpoint() (string, error)

func (*App) Start

func (app *App) Start()

Start starts the app

func (*App) Stop

func (app *App) Stop()

Stop the app

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"`
	jwt.StandardClaims
}

UserClaims is the oauth token struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL