auth

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IUseCases

type IUseCases interface {
	NewCredentialsFromReadCloser(body io.ReadCloser) (*dto.Credentials, error)
	NewAuthorizationDataFromReadCloser(body io.ReadCloser) (*dto.AuthorizationData, error)
	IsInvalidAuthType(authType authEnums.AuthorizationType) error
	ToLoginResponse(
		account *authEntities.Account, accessToken, refreshToken string, expiresAt time.Time) *dto.LoginResponse
	ToCreateAccountFromKeycloakResponse(account *authEntities.Account) *dto.CreateAccountFromKeycloakResponse
	ValidateLogin(account *authEntities.Account, loginData *dto.LoginData) error
	CheckCreateAccountErrorType(err error) error
	NewAccountFromKeyCloakUserInfo(userInfo *gocloak.UserInfo) *authEntities.Account
	GenerateResetPasswordCode() string
	ValidateEmail(email string) error
	NewKeycloakTokenFromReadCloser(body io.ReadCloser) (*dto.KeycloakToken, error)
	NewAccountFromReadCloser(body io.ReadCloser) (*authEntities.Account, error)
	NewEmailDataFromReadCloser(body io.ReadCloser) (data *dto.EmailData, err error)
	NewResetCodeDataFromReadCloser(body io.ReadCloser) (data *dto.ResetCodeData, err error)
	NewPasswordFromReadCloser(body io.ReadCloser) (password string, err error)
	NewRefreshTokenFromReadCloser(body io.ReadCloser) (token string, err error)
	NewValidateUniqueFromReadCloser(body io.ReadCloser) (validateUnique *dto.ValidateUnique, err error)
	NewAccountUpdateFromReadCloser(body io.ReadCloser) (*authEntities.Account, error)
}

func NewAuthUseCases

func NewAuthUseCases() IUseCases

type UseCases

type UseCases struct {
}

func (*UseCases) CheckCreateAccountErrorType

func (u *UseCases) CheckCreateAccountErrorType(err error) error

func (*UseCases) GenerateResetPasswordCode

func (u *UseCases) GenerateResetPasswordCode() string

func (*UseCases) IsInvalidAuthType

func (u *UseCases) IsInvalidAuthType(authType authEnums.AuthorizationType) error

func (*UseCases) NewAccountFromKeyCloakUserInfo

func (u *UseCases) NewAccountFromKeyCloakUserInfo(userInfo *gocloak.UserInfo) *authEntities.Account

func (*UseCases) NewAccountFromReadCloser

func (u *UseCases) NewAccountFromReadCloser(body io.ReadCloser) (*authEntities.Account, error)

func (*UseCases) NewAccountUpdateFromReadCloser

func (u *UseCases) NewAccountUpdateFromReadCloser(body io.ReadCloser) (*authEntities.Account, error)

func (*UseCases) NewAuthorizationDataFromReadCloser

func (u *UseCases) NewAuthorizationDataFromReadCloser(body io.ReadCloser) (*dto.AuthorizationData, error)

func (*UseCases) NewCredentialsFromReadCloser

func (u *UseCases) NewCredentialsFromReadCloser(body io.ReadCloser) (*dto.Credentials, error)

func (*UseCases) NewEmailDataFromReadCloser

func (u *UseCases) NewEmailDataFromReadCloser(body io.ReadCloser) (data *dto.EmailData, err error)

func (*UseCases) NewKeycloakTokenFromReadCloser

func (u *UseCases) NewKeycloakTokenFromReadCloser(body io.ReadCloser) (*dto.KeycloakToken, error)

func (*UseCases) NewPasswordFromReadCloser

func (u *UseCases) NewPasswordFromReadCloser(body io.ReadCloser) (password string, err error)

func (*UseCases) NewRefreshTokenFromReadCloser

func (u *UseCases) NewRefreshTokenFromReadCloser(body io.ReadCloser) (token string, err error)

func (*UseCases) NewResetCodeDataFromReadCloser

func (u *UseCases) NewResetCodeDataFromReadCloser(body io.ReadCloser) (data *dto.ResetCodeData, err error)

func (*UseCases) NewValidateUniqueFromReadCloser

func (u *UseCases) NewValidateUniqueFromReadCloser(
	body io.ReadCloser) (validateUnique *dto.ValidateUnique, err error)

func (*UseCases) ToCreateAccountFromKeycloakResponse

func (u *UseCases) ToCreateAccountFromKeycloakResponse(
	account *authEntities.Account) *dto.CreateAccountFromKeycloakResponse

func (*UseCases) ToLoginResponse

func (u *UseCases) ToLoginResponse(account *authEntities.Account, accessToken, refreshToken string,
	expiresAt time.Time) *dto.LoginResponse

func (*UseCases) ValidateEmail

func (u *UseCases) ValidateEmail(email string) error

func (*UseCases) ValidateLogin

func (u *UseCases) ValidateLogin(account *authEntities.Account, loginData *dto.LoginData) error

Jump to

Keyboard shortcuts

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