client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID                               string  `json:"id"`
	ClientId                         string  `json:"client_id"`
	ClientSecret                     string  `json:"client_secret"`
	ClientName                       string  `json:"client_name"`
	ClientDisplayName                string  `json:"client_display_name"`
	IsRememberMeSelected             bool    `json:"is_remember_me_selected"`
	ClientType                       string  `json:"client_type"`
	AllowDisposableEmail             bool    `json:"allow_disposable_email"`
	FdsEnabled                       bool    `json:"fds_enabled"`
	EnablePasswordlessAuth           bool    `json:"enable_passwordless_auth"`
	EnableDeduplication              bool    `json:"enable_deduplication"`
	MobileNumberVerificationRequired bool    `json:"mobile_number_verification_required"`
	HostedPageGroup                  string  `json:"hosted_page_group"`
	PrimaryColor                     string  `json:"primaryColor"`
	AccentColor                      string  `json:"accentColor"`
	AutoLoginAfterRegister           bool    `json:"auto_login_after_register"`
	CompanyName                      string  `json:"company_name"`
	CompanyAddress                   string  `json:"company_address"`
	CompanyWebsite                   string  `json:"company_website"`
	TokenLifetimeInSeconds           int64   `json:"token_lifetime_in_seconds"`
	IdTokenLifetimeInSeconds         int64   `json:"id_token_lifetime_in_seconds"`
	RefreshTokenLifetimeInSeconds    int64   `json:"refresh_token_lifetime_in_seconds"`
	EmailVerificationRequired        bool    `json:"email_verification_required"`
	EnableBotDetection               bool    `json:"enable_bot_detection"`
	IsLoginSuccessPageEnabled        bool    `json:"is_login_success_page_enabled"`
	AllowGuestLogin                  bool    `json:"allow_guest_login"`
	JweEnabled                       bool    `json:"jwe_enabled"`
	AlwaysAskMfa                     bool    `json:"always_ask_mfa"`
	PasswordPolicy                   *string `json:"password_policy_ref,omitempty"`

	AppKey *AppKey `json:"appKey,omitempty"`

	AllowLoginWith               []string         `json:"allow_login_with"`
	RedirectUris                 []string         `json:"redirect_uris"`
	AllowedLogoutUrls            []string         `json:"allowed_logout_urls"`
	AllowedScopes                []string         `json:"allowed_scopes"`
	SocialProviders              []SocialProvider `json:"social_providers"`
	AdditionalAccessTokenPayload []string         `json:"additional_access_token_payload"`
	AllowedFields                []string         `json:"allowed_fields"`
	RequiredFields               []string         `json:"required_fields"`
	ConsentRefs                  []string         `json:"consent_refs"`
	ResponseTypes                []string         `json:"response_types"`
	GrantTypes                   []string         `json:"grant_types"`
	AllowedWebOrigins            []string         `json:"allowed_web_origins"`
	AllowedOrigins               []string         `json:"allowed_origins"`
	AllowedMfa                   []string         `json:"allowed_mfa"`
}

type AppKey

type AppKey struct {
	ID         string `json:"id"`
	PrivateKey string `json:"privateKey"`
	PublicKey  string `json:"publicKey"`
}

type Client

type Client interface {
	GetHooks() ([]*Hook, error)
	GetHook(ID string) (*Hook, error)
	UpsertHook(hook Hook) (*Hook, error)
	DeleteHook(ID string) error

	GetSocialProvider(name string) (*SocialProvider, error)

	GetConsentInstance(name string) (*ConsentInstance, error)

	UpdatePasswordPolicy(policy PasswordPolicy) (*PasswordPolicy, error)
	GetPasswordPolicy(id string) (*PasswordPolicy, error)
	GetPasswordPolicyByName(name string) (*PasswordPolicy, error)
	DeletePasswordPolicy(id string) error

	GetTenantInfo() (*TenantInfo, error)

	CreateHostedPagesGroup(group HostedPageGroup) error
	UpdateHostedPagesGroup(group HostedPageGroup) error
	DeleteHostedPagesGroup(groupName string) error
	GetHostedPagesGroup(groupName string) (*HostedPageGroup, error)

	CreateApp(app *App) (*App, error)
	GetApp(ClientId string) (*App, error)
	UpdateApp(app App) (*App, error)
	DeleteApp(ID string) error
}

func NewClient

func NewClient(host *string, clientId *string, clientSecret *string) (Client, error)

type ConsentInstance

type ConsentInstance struct {
	ID          string `json:"id"`
	ConsentName string `json:"consent_name"`
}

type Hook

type Hook struct {
	Id            string            `json:"_id,omitempty"`
	AuthType      string            `json:"auth_type,omitempty"`
	Events        []string          `json:"events"`
	URL           string            `json:"url"`
	CreatedTime   string            `json:"createdTime,omitempty"`
	UpdatedTime   string            `json:"updatedTime,omitempty"`
	ApiKeyDetails HookApiKeyDetails `json:"apikeyDetails,omitempty"`
}

type HookApiKeyDetails

type HookApiKeyDetails struct {
	APIKeyPlacement   string `json:"apikey_placement,omitempty"`
	APIKey            string `json:"apikey,omitempty"`
	APIKeyPlaceholder string `json:"apikey_placeholder,omitempty"`
}

type HostedPageGroup

type HostedPageGroup struct {
	Name  string
	Pages map[string]string
}

type PasswordPolicy

type PasswordPolicy struct {
	ID                string `json:"id"`
	PolicyName        string `json:"policy_name"`
	MinimumLength     int64  `json:"minimumLength"`
	NoOfDigits        int64  `json:"noOfDigits"`
	LowerAndUpperCase bool   `json:"lowerAndUpperCase"`
	NoOfSpecialChars  int64  `json:"noOfSpecialChars"`
}

type SocialProvider

type SocialProvider struct {
	Id           string `json:"id,omitempty"`
	SocialId     string `json:"social_id"`
	ProviderName string `json:"provider_name"`
	ProviderType string `json:"provider_type,omitempty"`
}

type TenantInfo

type TenantInfo struct {
	CustomFieldFlatten bool   `json:"Custom_field_flatten"`
	TenantKey          string `json:"tenant_key"`
	TenantName         string `json:"tenant_name"`
	VersionInfo        string `json:"versionInfo"`
}

Jump to

Keyboard shortcuts

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