Documentation
¶
Overview ¶
Package sync provides optional Auth0 user synchronization helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultUserMapper ¶
DefaultUserMapper provides a baseline Auth0 -> local user mapping.
Types ¶
type Auth0IdentifierStore
deprecated
added in
v0.44.0
type Auth0IdentifierStore = auth.IdentifierStore
Deprecated: use auth.IdentifierStore for provider-neutral identifier mapping.
type Config ¶
type Config struct {
Users auth.Users
IdentifierStore auth.IdentifierStore
Provider string
UserMapper UserMapper
}
Config configures the Auth0 sync service.
type IdentifierModel ¶
type IdentifierModel = authrepo.IdentifierModel
type IdentifierStore ¶
type IdentifierStore = authrepo.IdentifierStore
func NewIdentifierStore ¶
func NewIdentifierStore(db *bun.DB) *IdentifierStore
type ManagementClient ¶
type ManagementClient struct {
// contains filtered or unexported fields
}
ManagementClient wraps the Auth0 management API client.
func NewManagementClient ¶
func NewManagementClient(ctx context.Context, cfg ManagementConfig) (*ManagementClient, error)
NewManagementClient creates a new management client wrapper.
func (*ManagementClient) GetUser ¶
func (m *ManagementClient) GetUser(ctx context.Context, identifier string) (*management.User, error)
GetUser fetches an Auth0 user by identifier.
func (*ManagementClient) RawClient ¶
func (m *ManagementClient) RawClient() *management.Management
RawClient exposes the underlying management client.
func (*ManagementClient) UpdateUser ¶
func (m *ManagementClient) UpdateUser(ctx context.Context, identifier string, user *management.User) error
UpdateUser updates an Auth0 user.
type ManagementConfig ¶
type ManagementConfig struct {
Domain string
ClientID string
ClientSecret string
Client *management.Management
}
ManagementConfig configures the Auth0 management client.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service synchronizes Auth0 users into the local store.
type UserMapper ¶
UserMapper maps an Auth0 management user into a local auth.User.