auth

package
v0.0.0-...-b772d30 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

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

func NewGithubAuthHandler

func NewGithubAuthHandler(config *config.AppConfig, querier db.Querier) (*AuthHandler, error)

func (*AuthHandler) CallbackHandler

func (a *AuthHandler) CallbackHandler(c *fiber.Ctx) error

func (*AuthHandler) GenerateToken

func (ac *AuthHandler) GenerateToken(c *fiber.Ctx) error

TODO: Delete this

func (*AuthHandler) LoginHandler

func (a *AuthHandler) LoginHandler(c *fiber.Ctx) error

func (*AuthHandler) RegisterRoutes

func (ac *AuthHandler) RegisterRoutes(app *fiber.App)

type AuthResponse

type AuthResponse struct {
	Token     string `json:"token"`
	Name      string `json:"name"`
	Username  string `json:"username"`
	Email     string `json:"email"`
	AvatarUrl string `json:"avatar_url"`
}

type GithubUser

type GithubUser struct {
	Name      string `json:"name"`
	Username  string `json:"login"`
	Email     string `json:"email"`
	AvatarUrl string `json:"avatar_url"`
}

Jump to

Keyboard shortcuts

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