service

package
v0.0.0-...-74c6e08 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	GetAdminToken() (string, error)
	GetUserToken(string) (string, error)
	GetThingToken(string) (string, error)
	ValidateToken(string) (bool, error)
	GetClaimsToken(string) (*AuthClaim, error)
}

func New

func New(c ServiceConf) Auth

type AuthClaim

type AuthClaim struct {
	Role string `json:"Role"`
	jwt.StandardClaims
}

type ServiceConf

type ServiceConf struct {
	Secret      string
	Environment string
}

Jump to

Keyboard shortcuts

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