permissions

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeyAndSecretFromAccessToken

func GetKeyAndSecretFromAccessToken(accessToken string) (key string, secret string, err error)

func MarshalToken

func MarshalToken(tok *AppToken) ([]byte, error)

Types

type AppToken

type AppToken struct {
	Key         string   `json:"key"`
	Secret      string   `json:"secret"`
	IsMaster    bool     `json:"isMaster"`
	Permissions []string `json:"permissions"`
}

func GenerateRandomToken

func GenerateRandomToken(isMaster bool, permissions []string) (*AppToken, error)

func UnmarshalToken

func UnmarshalToken(marshalledToken []byte) (*AppToken, error)

func (*AppToken) GetAccessToken

func (a *AppToken) GetAccessToken() string

Jump to

Keyboard shortcuts

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