Documentation
¶
Index ¶
- Variables
- func GetAllGroupsForUser(ctx context.Context, userID string) ([]*gocloak.Group, error)
- func GetGroupByID(ctx context.Context, groupID string) (*gocloak.Group, error)
- func GetGroupByName(ctx context.Context, groupName string) (*gocloak.Group, error)
- func GetUser(ctx context.Context, idpSub string) (*gocloak.User, error)
- func GetUserByUsername(ctx context.Context, username string) (*gocloak.User, error)
- func Initialize(ctx context.Context) error
- func IsMemberOfGroup(ctx context.Context, userID string, group string) (bool, error)
- func MustGetGroupID(groupName string) string
- type ChangeGroupMembershipAction
- type ChangeGroupMembershipArgs
- type ChangeGroupMembershipWorker
- type GroupNotFoundError
- type SetUserAttributesArgs
- type SetUserAttributesWorker
- type SyncUserArgs
- type SyncUserWorker
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserNotFound = errors.New("user not found")
)
Functions ¶
func GetAllGroupsForUser ¶
func GetGroupByName ¶
func GetUserByUsername ¶
func Initialize ¶
func IsMemberOfGroup ¶
func MustGetGroupID ¶
MustGetGroupID converts a group name to a group ID. Do not use for group names not listed in config.UserGroups and subsequently in keycloakx.initializeGroups panics if the group name is not found
Types ¶
type ChangeGroupMembershipAction ¶
type ChangeGroupMembershipAction string
const ( ChangeGroupMembershipActionAdd ChangeGroupMembershipAction = "add" ChangeGroupMembershipActionRemove ChangeGroupMembershipAction = "remove" )
type ChangeGroupMembershipArgs ¶
type ChangeGroupMembershipArgs struct {
UserID int32
GroupID string
Action ChangeGroupMembershipAction
}
func (ChangeGroupMembershipArgs) Kind ¶
func (ChangeGroupMembershipArgs) Kind() string
type ChangeGroupMembershipWorker ¶
type ChangeGroupMembershipWorker struct {
river.WorkerDefaults[ChangeGroupMembershipArgs]
}
func (*ChangeGroupMembershipWorker) Work ¶
func (a *ChangeGroupMembershipWorker) Work(ctx context.Context, job *river.Job[ChangeGroupMembershipArgs]) error
type GroupNotFoundError ¶
type GroupNotFoundError struct {
Group string
}
func (GroupNotFoundError) Error ¶
func (g GroupNotFoundError) Error() string
type SetUserAttributesArgs ¶
type SetUserAttributesArgs struct {
KeycloakID string
}
func (SetUserAttributesArgs) Kind ¶
func (SetUserAttributesArgs) Kind() string
type SetUserAttributesWorker ¶
type SetUserAttributesWorker struct {
river.WorkerDefaults[SetUserAttributesArgs]
}
func (*SetUserAttributesWorker) Work ¶
func (u *SetUserAttributesWorker) Work(ctx context.Context, job *river.Job[SetUserAttributesArgs]) error
type SyncUserArgs ¶
func (SyncUserArgs) Kind ¶
func (SyncUserArgs) Kind() string
type SyncUserWorker ¶
type SyncUserWorker struct {
river.WorkerDefaults[SyncUserArgs]
}
func (*SyncUserWorker) Work ¶
func (u *SyncUserWorker) Work(ctx context.Context, job *river.Job[SyncUserArgs]) error
Click to show internal directories.
Click to hide internal directories.