scim

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package scim package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSCIMGroupInput

type CreateSCIMGroupInput struct {
	Name           string
	SCIMExternalID string
}

CreateSCIMGroupInput is the input for creating a new SCIM group.

type CreateSCIMUserInput

type CreateSCIMUserInput struct {
	Email          string
	SCIMExternalID string
	Active         bool
}

CreateSCIMUserInput is the input for creating a new SCIM user.

type DeleteSCIMResourceInput

type DeleteSCIMResourceInput struct {
	ID string // Metadata ID.
}

DeleteSCIMResourceInput is the input for deleting a SCIM resource.

type GetSCIMResourceInput

type GetSCIMResourceInput struct {
	SCIMExternalID string
}

GetSCIMResourceInput is the input for retrieving a SCIM resource.

type OP

type OP string

OP is the type of SCIM update operation.

func (OP) Equal

func (o OP) Equal(operation OP) bool

Equal returns true if the two operations are equal. Mainly just exists for convenience.

type Operation

type Operation struct {
	Value interface{} // Value can be multiple types.
	OP    OP
	Path  string
}

Operation represents a SCIM PATCH operation.

type Service

type Service interface {
	CreateSCIMToken(ctx context.Context) ([]byte, error)
	GetSCIMUsers(ctx context.Context, input *GetSCIMResourceInput) ([]models.User, error)
	CreateSCIMUser(ctx context.Context, input *CreateSCIMUserInput) (*models.User, error)
	UpdateSCIMUser(ctx context.Context, input *UpdateResourceInput) (*models.User, error)
	DeleteSCIMUser(ctx context.Context, input *DeleteSCIMResourceInput) error
	GetSCIMGroups(ctx context.Context, input *GetSCIMResourceInput) ([]models.Team, error)
	CreateSCIMGroup(ctx context.Context, input *CreateSCIMGroupInput) (*models.Team, error)
	UpdateSCIMGroup(ctx context.Context, input *UpdateResourceInput) (*models.Team, error)
	DeleteSCIMGroup(ctx context.Context, input *DeleteSCIMResourceInput) error
}

Service encapsulates the logic for interacting with the SCIM service.

func NewService

func NewService(
	logger logger.Logger,
	dbClient *db.Client,
	idp *auth.IdentityProvider,
) Service

NewService creates an instance of Service

type UpdateResourceInput

type UpdateResourceInput struct {
	ID         string // Metadata ID.
	Operations []Operation
}

UpdateResourceInput is the input for updating a SCIM resource.

Jump to

Keyboard shortcuts

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