server

package
v0.0.0-...-5491828 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const PasswordLengthMax = 18
View Source
const PasswordLengthMin = 5
View Source
const StringLengthMax = 24
View Source
const StringLengthMin = 5
View Source
const TokenByteLength = 24
View Source
const TokenHexLength = TokenByteLength * 4 / 3

Variables

This section is empty.

Functions

func StartServer

func StartServer() error

Types

type CreateUserData

type CreateUserData struct {
	Email           string `json:"email"`
	DisplayName     string `json:"display_name"`
	Password        string `json:"password"`
	ConfirmPassword string `json:"confirm_password"`
}

type LoginData

type LoginData struct {
	Email    string
	Password string
}

type LogoutData

type LogoutData struct {
	AccessToken string `json:"access_token"`
}

type RefreshData

type RefreshData struct {
	RefreshToken string `json:"refresh_token"`
}

type SessionResponseData

type SessionResponseData struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	Email        string `json:"email"`
	ExpiresAt    int64  `json:"expires_at"`
}

type ValidateTokenData

type ValidateTokenData struct {
	Email        string `json:"email"`
	Token        string `json:"token"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type ValidationBag

type ValidationBag struct {
	Responses map[string]ValidationReponse
}

func (*ValidationBag) Clear

func (r *ValidationBag) Clear()

func (*ValidationBag) Valid

func (r *ValidationBag) Valid() bool

type ValidationReponse

type ValidationReponse string

func (*ValidationReponse) Valid

func (r *ValidationReponse) Valid() bool

Jump to

Keyboard shortcuts

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