jwt

package
v0.0.0-...-d0e9eb4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	AuthId    string
	Key       string
	Username  string
	ValidFrom time.Time
	Lifetime  time.Duration
	Uid       string
	Grants    Grants `json:"grants"`
}

func (*AccessToken) AddVoiceGrants

func (acctkn *AccessToken) AddVoiceGrants(grants VoiceGrants)

func (*AccessToken) New

func (acctkn *AccessToken) New(authId string, authToken string, username string, validFrom time.Time, lifetime time.Duration, validTill time.Time, uid string) error

func (*AccessToken) ToJwt

func (acctkn *AccessToken) ToJwt() string

type Grants

type Grants struct {
	Voice VoiceGrants `json:"voice"`
}

type JwtClaims

type JwtClaims struct {
	jwt.StandardClaims
	Grants Grants `json:"grants"`
}

type VoiceGrants

type VoiceGrants struct {
	IncomingAllow bool `json:"incoming_allow"`
	OutgoingAllow bool `json:"outgoing_allow"`
}

Jump to

Keyboard shortcuts

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