auth

package
v0.0.0-...-98da78b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(db *db.Postgres) chi.Router

Types

type Auth

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

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,min=8"`
}

type LoginResponse

type LoginResponse struct {
	jwt.Tokens
}

type RefreshRequest

type RefreshRequest struct {
	RefreshToken string `json:"refresh_token" validate:"required"`
}

type RefreshResponse

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

type RegisterRequest

type RegisterRequest struct {
	db.InsertUser
}

Jump to

Keyboard shortcuts

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