gooauthservice

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoOauthService

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

func NewGoOauthService

func NewGoOauthService(database *gorm.DB, secretForJwt string) *GoOauthService

func (*GoOauthService) ChangePassword

func (s *GoOauthService) ChangePassword(ctx context.Context, keycloakUserId, newPassword string) error

func (*GoOauthService) CheckoutMiddleware

func (s *GoOauthService) CheckoutMiddleware(requets *http.Request) bool

func (*GoOauthService) CreateUser

func (s *GoOauthService) CreateUser(ctx context.Context, userParam gooauthrequest.CreateUser, role string, attributes *map[string][]string) (string, error)

func (GoOauthService) ErrorHandler

func (GoOauthService) ErrorHandler() error

func (*GoOauthService) GetExp

func (s *GoOauthService) GetExp() int

func (*GoOauthService) GetJwtToken

func (s *GoOauthService) GetJwtToken(exp int, userId uint, pathsAllow []string, email string) (string, error)

func (*GoOauthService) GetSecretByClient

func (s *GoOauthService) GetSecretByClient(ctx context.Context) error

func (*GoOauthService) GetUserByRole

func (s *GoOauthService) GetUserByRole(ctx context.Context, role string) ([]*gooauthrest.User, error)

func (*GoOauthService) GetUserByUserId

func (s *GoOauthService) GetUserByUserId(ctx context.Context, userId string) (*gooauthrest.User, error)

func (*GoOauthService) GetUsersByUsersId

func (s *GoOauthService) GetUsersByUsersId(ctx context.Context, keycloakUsersId []string) ([]gooauthrest.User, error)

func (*GoOauthService) LoginUser

func (s *GoOauthService) LoginUser(ctx context.Context, userName, password string) (*gooauthrest.JWT, error)

func (*GoOauthService) UpdateUser

func (s *GoOauthService) UpdateUser(ctx context.Context, keyCloakUserId string, attributes *map[string][]string, req gooauthrequest.UpdateUserRequest) error

func (*GoOauthService) ValidateMailByUserId

func (s *GoOauthService) ValidateMailByUserId(ctx context.Context, userId string) error

type PasswordService

type PasswordService struct {
}

func NewPasswordService

func NewPasswordService() *PasswordService

func (*PasswordService) EncryptPassword

func (ps *PasswordService) EncryptPassword(password string) (string, error)

func (*PasswordService) VerifyPassword

func (ps *PasswordService) VerifyPassword(passwordDb, paswordLogin string) bool

Jump to

Keyboard shortcuts

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