Documentation ¶
Index ¶
- Constants
- type APIInterface
- type APIOptions
- type AssociateUserToTenantResponse
- type CreateOrUpdateTenantResponse
- type CreateOrUpdateThirdPartyConfigResponse
- type DeleteTenantResponse
- type DeleteThirdPartyConfigResponse
- type DisassociateUserFromTenantResponse
- type ListAllTenantsResponse
- type LoginMethodsGETResponse
- type OverrideStruct
- type RecipeInterface
- type Tenant
- type TenantConfig
- type TypeEmailPassword
- type TypeInput
- type TypeLoginMethods
- type TypeNormalisedInput
- type TypePasswordless
- type TypeThirdParty
- type TypeThirdPartyProvider
Constants ¶
View Source
const DefaultTenantId string = "public"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInterface ¶
type APIInterface struct {
LoginMethodsGET *func(tenantId string, clientType *string, options APIOptions, userContext supertokens.UserContext) (LoginMethodsGETResponse, error)
}
type APIOptions ¶
type APIOptions struct { RecipeImplementation RecipeInterface Config TypeNormalisedInput RecipeID string Req *http.Request Res http.ResponseWriter OtherHandler http.HandlerFunc StaticThirdPartyProviders []tpmodels.ProviderInput }
type AssociateUserToTenantResponse ¶
type AssociateUserToTenantResponse struct { OK *struct { WasAlreadyAssociated bool } UnknownUserIdError *struct{} EmailAlreadyExistsError *struct{} PhoneNumberAlreadyExistsError *struct{} ThirdPartyUserAlreadyExistsError *struct{} }
type CreateOrUpdateTenantResponse ¶
type CreateOrUpdateTenantResponse struct { OK *struct { CreatedNew bool } }
type CreateOrUpdateThirdPartyConfigResponse ¶
type CreateOrUpdateThirdPartyConfigResponse struct { OK *struct { CreatedNew bool } }
type DeleteTenantResponse ¶
type DeleteTenantResponse struct { OK *struct { DidExist bool } }
type DeleteThirdPartyConfigResponse ¶
type DeleteThirdPartyConfigResponse struct { OK *struct { DidConfigExist bool } }
type DisassociateUserFromTenantResponse ¶
type DisassociateUserFromTenantResponse struct { OK *struct { WasAssociated bool } }
type ListAllTenantsResponse ¶
type ListAllTenantsResponse struct { OK *struct { Tenants []Tenant `json:"tenants"` } }
type LoginMethodsGETResponse ¶
type LoginMethodsGETResponse struct { OK *TypeLoginMethods GeneralError *supertokens.GeneralErrorResponse }
type OverrideStruct ¶
type OverrideStruct struct { Functions func(originalImplementation RecipeInterface) RecipeInterface APIs func(originalImplementation APIInterface) APIInterface }
type RecipeInterface ¶
type RecipeInterface struct { GetTenantId *func(tenantIdFromFrontend string, userContext supertokens.UserContext) (string, error) // Tenant management CreateOrUpdateTenant *func(tenantId string, config TenantConfig, userContext supertokens.UserContext) (CreateOrUpdateTenantResponse, error) DeleteTenant *func(tenantId string, userContext supertokens.UserContext) (DeleteTenantResponse, error) GetTenant *func(tenantId string, userContext supertokens.UserContext) (*Tenant, error) ListAllTenants *func(userContext supertokens.UserContext) (ListAllTenantsResponse, error) // Third party provider management CreateOrUpdateThirdPartyConfig *func(tenantId string, config tpmodels.ProviderConfig, skipValidation *bool, userContext supertokens.UserContext) (CreateOrUpdateThirdPartyConfigResponse, error) DeleteThirdPartyConfig *func(tenantId string, thirdPartyId string, userContext supertokens.UserContext) (DeleteThirdPartyConfigResponse, error) // User tenant association AssociateUserToTenant *func(tenantId string, userId string, userContext supertokens.UserContext) (AssociateUserToTenantResponse, error) DisassociateUserFromTenant *func(tenantId string, userId string, userContext supertokens.UserContext) (DisassociateUserFromTenantResponse, error) }
type Tenant ¶
type Tenant struct { TenantId string `json:"tenantId"` EmailPassword struct { Enabled bool `json:"enabled"` } `json:"emailPassword"` Passwordless struct { Enabled bool `json:"enabled"` } `json:"passwordless"` ThirdParty struct { Enabled bool `json:"enabled"` Providers []tpmodels.ProviderConfig `json:"providers"` } `json:"thirdParty"` CoreConfig map[string]interface{} `json:"coreConfig"` }
type TenantConfig ¶
type TypeEmailPassword ¶
type TypeEmailPassword struct {
Enabled bool `json:"enabled"`
}
type TypeInput ¶
type TypeInput struct { GetAllowedDomainsForTenantId func(tenantId string, userContext supertokens.UserContext) ([]string, error) Override *OverrideStruct }
type TypeLoginMethods ¶
type TypeLoginMethods struct { EmailPassword TypeEmailPassword `json:"emailPassword"` Passwordless TypePasswordless `json:"passwordless"` ThirdParty TypeThirdParty `json:"thirdParty"` }
type TypeNormalisedInput ¶
type TypeNormalisedInput struct { GetAllowedDomainsForTenantId func(tenantId string, userContext supertokens.UserContext) ([]string, error) Override OverrideStruct }
type TypePasswordless ¶
type TypePasswordless struct {
Enabled bool `json:"enabled"`
}
type TypeThirdParty ¶
type TypeThirdParty struct { Enabled bool `json:"enabled"` Providers []TypeThirdPartyProvider `json:"providers"` }
type TypeThirdPartyProvider ¶
Click to show internal directories.
Click to hide internal directories.