authservice

package
v0.0.0-...-b50d13f Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	v1.UnimplementedAuthServiceServer
	// contains filtered or unexported fields
}

func New

func New(userRepo UserRepo, signer Signer) *Service

func (*Service) Auth

func (s *Service) Auth(ctx context.Context, r *v1.AuthRequest) (*v1.AuthResponse, error)

func (*Service) CreateUser

type Signer

type Signer interface {
	Sign(j *jwt.CustomClaims) (string, error)
}

type UserRepo

type UserRepo interface {
	CreateUser(ctx context.Context, user *models.User) (int64, error)
	GetUser(ctx context.Context, user, pass string) (*models.User, error)
}

Jump to

Keyboard shortcuts

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