auth

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "/api/v1/auth"

Variables

This section is empty.

Functions

This section is empty.

Types

type OtpRequest

type OtpRequest struct {
	Password string `json:"password,omitempty" validate:"required,numeric,len=6"`
}

type Plugin

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

func (*Plugin) Init

func (p *Plugin) Init(userStorage storage.UserStorage, tokenService token.Service) error

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns user-friendly plugin name

func (*Plugin) Register

func (p *Plugin) Register(mux *flow.Mux)

type RefreshTokenRequest

type RefreshTokenRequest struct {
	RefreshToken string `json:"refresh_token" validate:"required,uuid4"`
}

type SignInRequest

type SignInRequest struct {
	Username string `json:"username,omitempty" validate:"required,min=3,max=254"`
	Password string `json:"password,omitempty" validate:"required,min=8,max=64"`
}

type SignUpRequest

type SignUpRequest struct {
	Username       string `json:"username,omitempty" validate:"required,min=3,max=254"`
	Email          string `json:"email,omitempty" validate:"required,email,min=3,max=254"`
	Password       string `json:"password" validate:"required,eqfield=RepeatPassword,min=8,max=64"`
	RepeatPassword string `json:"repeat_password" validate:"required,min=8,max=64"`
}

type SignUpResponse

type SignUpResponse struct {
	Uri string `json:"uri"`
	Qr  string `json:"qr"`
}

Jump to

Keyboard shortcuts

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