core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author interface {
	AuthString(id, info string) (string, error)
	Verify(token string) (string, string, error)
}

func NewJWTAuthor

func NewJWTAuthor(expirationTime time.Duration, secret string) Author

type JWTAuthor

type JWTAuthor struct {
	ExpirationTime time.Duration
	Secret         string
}

func (*JWTAuthor) AuthString

func (g *JWTAuthor) AuthString(id, unEncryptedInfo string) (string, error)

func (*JWTAuthor) Verify

func (g *JWTAuthor) Verify(token string) (string, string, error)

Jump to

Keyboard shortcuts

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