gf_identity

package
v0.0.0-...-a1b0e2b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: GPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminIs

func AdminIs(pUserIDstr gf_core.GF_ID,
	pCtx context.Context,
	pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror

func AdminPipelineDeleteUser

func AdminPipelineDeleteUser(pInput *GFadminUserDeleteInput,
	pCtx context.Context,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror

func AdminPipelineGetAllInviteList

func AdminPipelineGetAllInviteList(pCtx context.Context,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) ([]map[string]interface{}, *gf_core.GFerror)

func AdminPipelineUserAddToInviteList

func AdminPipelineUserAddToInviteList(pInput *GFadminInputAddToInviteList,
	pCtx context.Context,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror

func AdminPipelineUserRemoveFromInviteList

func AdminPipelineUserRemoveFromInviteList(pInput *GFadminRemoveFromInviteListInput,
	pCtx context.Context,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror

func AdminPipelineUserResendConfirmEmail

func AdminPipelineUserResendConfirmEmail(pInput *GFadminResendConfirmEmailInput,
	pCtx context.Context,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror

func HOTPgenerateValue

func HOTPgenerateValue(pSecretKeyBase32str string,
	pTimeIntervalInt int64,
	pRuntimeSys *gf_core.RuntimeSys) (string, *gf_core.GFerror)

func InitService

func InitService(pTemplatesPathsMap map[string]string,
	pHTTPmux *http.ServeMux,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) (*gf_identity_core.GFkeyServerInfo, *gf_core.GFerror)

func TOTPgenerateValue

func TOTPgenerateValue(pSecretKeyStr string,
	pRuntimeSys *gf_core.RuntimeSys) (string, *gf_core.GFerror)

func TestCreateUserInDB

func TestCreateUserInDB(pTest *testing.T,
	pCtx context.Context,
	pRuntimeSys *gf_core.RuntimeSys) (gf_core.GF_ID, gf_identity_core.GFuserName)

func TestDBcleanup

func TestDBcleanup(pCtx context.Context,
	pRuntimeSys *gf_core.RuntimeSys)

func TestStartService

func TestStartService(pAuthSubsystemTypeStr string,
	pTemplatesPathsMap map[string]string,
	pPortInt int,
	pRuntimeSys *gf_core.RuntimeSys) *gf_identity_core.GFkeyServerInfo

func TestUserHTTPcreate

func TestUserHTTPcreate(pTestUserNameStr string,
	pTestUserPassStr string,
	pTestEmailStr string,
	pHTTPagent *gorequest.SuperAgent,
	pTestPortInt int,
	pTest *testing.T)

func TestUserHTTPuserpassLogin

func TestUserHTTPuserpassLogin(pTestUserNameStr string,
	pTestUserPassStr string,
	pHTTPagent *gorequest.SuperAgent,
	pTestPortInt int,
	pTest *testing.T) []*http.Cookie

func TestUserpassCreateAndLoginNewUser

func TestUserpassCreateAndLoginNewUser(pUserInfo *GFtestUserInfo,
	pTest *testing.T,
	pHTTPagent *gorequest.SuperAgent,
	pIdentityServicePortInt int,
	pCtx context.Context,
	pRuntimeSys *gf_core.RuntimeSys) []*http.Cookie

func Tinit

func Tinit(pServiceNameStr string,
	pMongoHostStr string,
	pSQLhostStr string,
	pLogNewFun gf_core.GFlogFun,
	pLogFun func(string, string)) *gf_core.RuntimeSys

Types

type GFadminInputAddToInviteList

type GFadminInputAddToInviteList struct {
	AdminUserID gf_core.GF_ID `validate:"required,min=3,max=50"`
	EmailStr    string        `validate:"required,email"`
}

type GFadminInputLogin

type GFadminInputLogin struct {
	UserNameStr gf_identity_core.GFuserName `validate:"required,min=3,max=50"`

	// pass is not provided if email-login is used
	PassStr string `validate:"omitempty,min=8,max=50"`

	// admin email
	EmailStr string `validate:"omitempty,email"`
}

type GFadminOutputCreateAdmin

type GFadminOutputCreateAdmin struct {
	General *gf_identity_core.GFuserpassOutputCreate
}

type GFadminOutputLogin

type GFadminOutputLogin struct {
	UserExistsBool     bool
	EmailConfirmedBool bool
	PassValidBool      bool
	UserIDstr          gf_core.GF_ID
}

func AdminPipelineLogin

func AdminPipelineLogin(pInput *GFadminInputLogin,
	pCtx context.Context,
	pLocalHub *sentry.Hub,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) (*GFadminOutputLogin, *gf_core.GFerror)

type GFadminRemoveFromInviteListInput

type GFadminRemoveFromInviteListInput struct {
	AdminUserID gf_core.GF_ID `validate:"required,min=3,max=50"`
	EmailStr    string        `validate:"required,email"`
}

type GFadminResendConfirmEmailInput

type GFadminResendConfirmEmailInput struct {
	UserID      gf_core.GF_ID               `validate:"required,min=3,max=50"`
	UserNameStr gf_identity_core.GFuserName `validate:"required,min=3,max=50"`
	EmailStr    string                      `validate:"required,email"`
}

type GFadminUserDeleteInput

type GFadminUserDeleteInput struct {
	UserID      gf_core.GF_ID               `validate:"required,min=3,max=50"`
	UserNameStr gf_identity_core.GFuserName `validate:"required,min=3,max=50"`
}

type GFadminUserViewOutput

type GFadminUserViewOutput struct {
	ID                 gf_core.GF_ID                       `json:"id_str"`
	CreationUNIXtimeF  float64                             `json:"creation_unix_time_f"`
	UserNameStr        gf_identity_core.GFuserName         `json:"user_name_str"`
	ScreenNameStr      string                              `json:"screen_name_str"`
	AddressesETHlst    []gf_identity_core.GFuserAddressETH `json:"addresses_eth_lst"`
	EmailStr           string                              `json:"email_str"`
	EmailConfirmedBool bool                                `json:"email_confirmed_bool"`
	ProfileImageURLstr string                              `json:"profile_image_url_str"`
}

func AdminPipelineGetAllUsers

func AdminPipelineGetAllUsers(pCtx context.Context,
	pServiceInfo *gf_identity_core.GFserviceInfo,
	pRuntimeSys *gf_core.RuntimeSys) ([]*GFadminUserViewOutput, *gf_core.GFerror)

type GFtestUserInfo

type GFtestUserInfo struct {
	NameStr  string
	PassStr  string
	EmailStr string
}

type GFuserAuthMFAinputConfirm

type GFuserAuthMFAinputConfirm struct {
	UserNameStr        gf_identity_core.GFuserName `validate:"required,min=3,max=50"`
	ExternHtopValueStr string                      `validate:"required,min=10,max=200"`
	SecretKeyBase32str string                      `validate:"required,min=8,max=200"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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