auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const DefaultExpireTimeInterval = time.Second * 120

Variables

This section is empty.

Functions

func NewDefaultApuAuthenticator

func NewDefaultApuAuthenticator() *defaultApuAuthenticator

Types

type ApiAuthenticator

type ApiAuthenticator interface {
	Request(appId string, pubKey, privKey []byte) string
	Auth(sig string) bool
}

type ApiRequest

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

func NewApiRequest

func NewApiRequest(token, metadata string, pubKey []byte) *ApiRequest

func NewApiRequestFromSig

func NewApiRequestFromSig(sig string) (*ApiRequest, error)

type AuthToken

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

func NewAuthToken

func NewAuthToken(appId string, timestamp int64) *AuthToken

func NewAuthTokenFromMetadata

func NewAuthTokenFromMetadata(metadata string) (*AuthToken, error)

Jump to

Keyboard shortcuts

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