Documentation ¶
Index ¶
- func MakeAuthorizationRegisterComponentMW(logger log.Logger) func(Component) Component
- func MakeGetConfigurationEndpoint(component Component) cs.Endpoint
- func MakeHTTPRecaptchaValidationMW(recaptchaURL string, recaptchaSecret string, logger log.Logger) func(http.Handler) http.Handler
- func MakeRegisterCorpUserEndpoint(component Component) cs.Endpoint
- func MakeRegisterHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server
- func MakeRegisterUserEndpoint(component Component, socialRealm string) cs.Endpoint
- type Component
- type ComponentBuilder
- type ConfigurationDBModule
- type Endpoints
- type KeycloakClient
- type RealmRegisterConfiguration
- type TrustIDAuthToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAuthorizationRegisterComponentMW ¶
MakeAuthorizationRegisterComponentMW checks authorization and return an error if the action is not allowed.
func MakeGetConfigurationEndpoint ¶
MakeGetConfigurationEndpoint endpoint creation
func MakeHTTPRecaptchaValidationMW ¶
func MakeHTTPRecaptchaValidationMW(recaptchaURL string, recaptchaSecret string, logger log.Logger) func(http.Handler) http.Handler
MakeHTTPRecaptchaValidationMW retrieves the recaptcha code and checks its validity
func MakeRegisterCorpUserEndpoint ¶
MakeRegisterCorpUserEndpoint endpoint creation
func MakeRegisterHandler ¶
MakeRegisterHandler make an HTTP handler for the self-register endpoint.
Types ¶
type Component ¶
type Component interface { RegisterUser(ctx context.Context, targetRealmName, clientRealmName string, user apiregister.UserRepresentation) (string, error) GetConfiguration(ctx context.Context, realmName string) (apiregister.ConfigurationRepresentation, error) }
Component is the register component interface.
type ComponentBuilder ¶
type ComponentBuilder interface { Build() Component AddTargetRealm(realmConf RealmRegisterConfiguration) error }
ComponentBuilder interface
func NewComponentBuilder ¶
func NewComponentBuilder(keycloakURL string, keycloakClient KeycloakClient, tokenProvider toolbox.OidcTokenProvider, usersDBModule keycloakb.UsersDetailsDBModule, configDBModule ConfigurationDBModule, eventsDBModule database.EventsDBModule, logger internal.Logger) ComponentBuilder
NewComponentBuilder returns a builder for the management component.
type ConfigurationDBModule ¶
type ConfigurationDBModule interface { GetConfigurations(context.Context, string) (configuration.RealmConfiguration, configuration.RealmAdminConfiguration, error) GetConfiguration(context.Context, string) (configuration.RealmConfiguration, error) }
ConfigurationDBModule is the interface of the configuration module.
type Endpoints ¶
type Endpoints struct { RegisterUser endpoint.Endpoint RegisterCorpUser endpoint.Endpoint GetConfiguration endpoint.Endpoint }
Endpoints for self service
type KeycloakClient ¶
type KeycloakClient interface { CreateUser(accessToken string, realmName string, targetRealmName string, user kc.UserRepresentation) (string, error) UpdateUser(accessToken string, realmName, userID string, user kc.UserRepresentation) error GetUsers(accessToken string, reqRealmName, targetRealmName string, paramKV ...string) (kc.UsersPageRepresentation, error) GetGroups(accessToken string, realmName string) ([]kc.GroupRepresentation, error) ExecuteActionsEmail(accessToken string, realmName string, userID string, actions []string, paramKV ...string) error }
KeycloakClient are methods from keycloak-client used by this component
type RealmRegisterConfiguration ¶
type RealmRegisterConfiguration struct { Realm string EndUserGroups []string EnduserClientID string SsePublicURL string // contains filtered or unexported fields }
RealmRegisterConfiguration struct
type TrustIDAuthToken ¶
TrustIDAuthToken struct
func (TrustIDAuthToken) ToJSON ¶
func (t TrustIDAuthToken) ToJSON() string
ToJSON converts TrustIDAuthToken to its JSON representation