auth

package
v0.0.0-...-689dde8 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 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 AuthService

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

func NewAuthService

func NewAuthService(userSvc domain.UserService, oauthSvc domain.OAuth2Service, tokenSvc domain.TokenService) *AuthService

func (*AuthService) Login

func (a *AuthService) Login(ctx context.Context, token string) (string, error)

type GoogleOAuth2Service

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

func NewGoogleOAuth2Service

func NewGoogleOAuth2Service() (*GoogleOAuth2Service, error)

func (*GoogleOAuth2Service) ValidateToken

func (g *GoogleOAuth2Service) ValidateToken(token string) (string, error)

type JWTService

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

func NewJWTService

func NewJWTService(secret string, ur domain.UserRepository) *JWTService

func (*JWTService) GenerateToken

func (j *JWTService) GenerateToken(ctx context.Context, userID int64) (string, error)

Jump to

Keyboard shortcuts

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