security

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

README

Note these are test keys

The keys in this repo are just for testing purposes, in production please create and store the keys not in a public repo process to generate the keys https://techdocs.akamai.com/iot-token-access-control/docs/generate-rsa-keys

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EcoUser

type EcoUser struct {
	Email    string `json:"email"`
	Birthday int64  `json:"birthday"`
	jwt.StandardClaims
}

type Validator

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

func NewValidator

func NewValidator(keyPriv, keyPub string) (*Validator, error)

func (*Validator) IsValid

func (val *Validator) IsValid(token string) (jwt.MapClaims, error)

func (*Validator) SignAndCreate

func (val *Validator) SignAndCreate(user *EcoUser) (string, error)

Jump to

Keyboard shortcuts

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