auth

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const APP_ID = "f79d7735-864b-4ed7-a6dc-a3971824843b"
View Source
const APP_NAME = "Mosh"

Variables

View Source
var DEFAULT_HEADER = http.Header{
	"Content-Type": {"application/json"},
	"accept":       {"application/json"},
}

Functions

This section is empty.

Types

type Auth

type Auth struct {
	ID         string
	Name       string
	Token      string
	Pin        Pin
	Authorized bool
}

func GetAuthorizer

func GetAuthorizer(conf *config.Config) Auth

func (*Auth) CheckToken

func (a *Auth) CheckToken()

func (*Auth) ObtainPin

func (a *Auth) ObtainPin()

func (*Auth) ObtainToken

func (a *Auth) ObtainToken()

func (*Auth) OpenPinURL

func (a *Auth) OpenPinURL()

func (*Auth) PollPIN

func (a *Auth) PollPIN()

type AuthToken

type AuthToken struct {
	Response string `json:"authToken"`
}

type Pin

type Pin struct {
	ID   int    `json:"id"`
	Code string `json:"code"`
}

func (*Pin) GetID

func (p *Pin) GetID() string

Jump to

Keyboard shortcuts

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