auth

package
v0.0.0-...-9a826e6 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallbackHandler = "/auth/callback"
	GetUserHandler  = "/user"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	CallbackHandler(w http.ResponseWriter, r *http.Request)
	GetUserHandler(w http.ResponseWriter, r *http.Request)
}

func NewAuthService

func NewAuthService(
	router *mux.Router,
	cfg config.Config,
	userRepo repository.UserRepository,
	dashboardRepo repository.DashboardRepository,
	projectRepo repository.ProjectRepository,
	mw token.AuthMiddleware,
) AuthService

type GetUserResponse

type GetUserResponse struct {
	ID          string `json:"id"`
	DisplayName string `json:"display_name"`
	ProfilePic  string `json:"profile_pic"`
}

type GoogleUserInfo

type GoogleUserInfo struct {
	Email      string `json:"email"`
	ProfilePic string `json:"picture"`
}

Jump to

Keyboard shortcuts

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