multitenancy

package
v0.0.0-...-b59dafb Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoginMethodsAPI = "/loginmethods"
)
View Source
const RECIPE_ID = "multitenancy"

Variables

This section is empty.

Functions

func AfterEach

func AfterEach()

func AssociateUserToTenant

func AssociateUserToTenant(tenantId string, userId string, userContext ...supertokens.UserContext) (multitenancymodels.AssociateUserToTenantResponse, error)

func BeforeEach

func BeforeEach()

func CreateOrUpdateThirdPartyConfig

func CreateOrUpdateThirdPartyConfig(tenantId string, config tpmodels.ProviderConfig, skipValidation *bool, userContext ...supertokens.UserContext) (multitenancymodels.CreateOrUpdateThirdPartyConfigResponse, error)

Third party provider management

func DeleteTenant

func DeleteTenant(tenantId string, userContext ...supertokens.UserContext) (multitenancymodels.DeleteTenantResponse, error)

func DeleteThirdPartyConfig

func DeleteThirdPartyConfig(tenantId string, thirdPartyId string, userContext ...supertokens.UserContext) (multitenancymodels.DeleteThirdPartyConfigResponse, error)

func DisassociateUserFromTenant

func DisassociateUserFromTenant(tenantId string, userId string, userContext ...supertokens.UserContext) (multitenancymodels.DisassociateUserFromTenantResponse, error)

func GetTenant

func GetTenant(tenantId string, userContext ...supertokens.UserContext) (*multitenancymodels.Tenant, error)

func ResetForTest

func ResetForTest()

Types

type Recipe

type Recipe struct {
	RecipeModule supertokens.RecipeModule
	Config       multitenancymodels.TypeNormalisedInput
	RecipeImpl   multitenancymodels.RecipeInterface
	APIImpl      multitenancymodels.APIInterface

	GetAllowedDomainsForTenantId func(tenantId string, userContext supertokens.UserContext) ([]string, error)
	// contains filtered or unexported fields
}

func GetRecipeInstance

func GetRecipeInstance() *Recipe

func GetRecipeInstanceOrThrowError

func GetRecipeInstanceOrThrowError() (*Recipe, error)

func MakeRecipe

func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config *multitenancymodels.TypeInput, onSuperTokensAPIError func(err error, req *http.Request, res http.ResponseWriter)) (*Recipe, error)

func (*Recipe) SetStaticThirdPartyProviders

func (r *Recipe) SetStaticThirdPartyProviders(providers []tpmodels.ProviderInput)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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