security

package
v0.0.0-...-5863de9 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClaimToContext

func AddClaimToContext(claim *Claim, ctx context.Context) context.Context

func GenerateJWTToken

func GenerateJWTToken(user *domain.User) string

Types

type Claim

type Claim struct {
	ID       string `json:"id"`
	UserName string `json:"username"`
	Church   *domain.Church
	jwt.RegisteredClaims
}

func GetClaim

func GetClaim(token string) (bool, *Claim)

type Service

type Service interface {
	GenerateToken(churchID, username, password string) (string, error)
}

func NewAuthService

func NewAuthService(userRepository user.Repository, churchRepository church.Repository) Service

Directories

Path Synopsis
Package mock_security is a generated GoMock package.
Package mock_security is a generated GoMock package.

Jump to

Keyboard shortcuts

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