auth

package
v0.0.0-...-f270e70 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(u IAuthUsecase, next http.Handler) http.Handler

func GetFirebaseUser

func GetFirebaseUser(ctx context.Context) (*model.UserInfoByToken, error)

func GetUserId

func GetUserId(ctx context.Context) (*int, error)

Types

type AuthContext

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

type IAuthUsecase

type IAuthUsecase interface {
	GetFirebaseUser(ctx context.Context, token string) (*model.UserInfoByToken, error)
	GetUserId(uid string, provider string, issuedAt time.Time) (*int, error)
}

Jump to

Keyboard shortcuts

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