apiauth

package
v0.0.0-...-5c68377 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(
	newLambda func() rest.Lambda,
	initService func(projectPackage string),
)

Init initiates the auth-lambda.

func ParseAccessToken

func ParseAccessToken(source string) (ss.UserID, ss.Time, error, error)

ParseAccessToken parses token and verifies its signature. If access token is the valid returns user ID and tokening expiration time. Otherwise returns pair "user error" and "error of working".

func Run

func Run()

Run runs the API auth-lambda.

Types

type AccessToken

type AccessToken string

AccessToken is a access token.

func NewAccessToken

func NewAccessToken(user ss.UserID, expirationTime int64,
) (AccessToken, error)

NewAccessToken creates new access token.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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