auth

package
v0.0.0-...-d26b62e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AccountCreatedEvent = "AccountCreated"

AccountCreatedEvent is the name of the event that a new account was created

View Source
const AccountDeletedEvent = "AccountDeleted"

AccizbtDeletedEvent is the name of the event that a account was deleted

Variables

This section is empty.

Functions

func CheckSignature

func CheckSignature(token string) error

func ExtendToken

func ExtendToken(val string) (*jwt.Token, string, error)

func GenerateBearerToken

func GenerateBearerToken(user *models.User) (string, error)

func GenerateCookie

func GenerateCookie(token string, persistent bool) *http.Cookie

func GetJwt

func GetJwt(user *models.User) (string, error)

func WrapToken

func WrapToken(token string) string

Types

type AccountCommand

type AccountCommand struct {
	EventType string `json:"type"`
	UserID    string `json:"userId"`
	Username  string `json:"username"`
	Email     string `json:"email"`
}

Jump to

Keyboard shortcuts

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