scim

package
v2.35.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler added in v2.35.0

type Handler struct {
	// contains filtered or unexported fields
}

Handler wraps the elimity-com/scim library's Server to implement SCIM 2.0 endpoints. The library auto-serves /Schemas, /ResourceTypes, and /ServiceProviderConfig from schema definitions.

func New added in v2.35.0

func New(opts *Options) (*Handler, error)

func (*Handler) Handler added in v2.35.0

func (s *Handler) Handler() http.Handler

type Options added in v2.35.0

type Options struct {
	DB      database.Store
	Auditor *atomic.Pointer[audit.Auditor]
	IDPSync idpsync.IDPSync
	Logger  slog.Logger

	// AGPL is needed for CreateUser.
	AGPL *agpl.API

	// SCIMAPIKey is the bearer token used to authenticate SCIM requests.
	SCIMAPIKey []byte
}

Options holds all the dependencies needed by SCIM resource handlers.

type ResourceUser added in v2.35.0

type ResourceUser struct {
	// contains filtered or unexported fields
}

func (*ResourceUser) Create added in v2.35.0

func (ru *ResourceUser) Create(r *http.Request, attributes scim.ResourceAttributes) (scim.Resource, error)

Create implements scim.ResourceHandler. Creates a new Coder user from SCIM attributes, or returns the existing user if a duplicate is found.

func (*ResourceUser) Delete added in v2.35.0

func (ru *ResourceUser) Delete(r *http.Request, idStr string) error

Delete implements scim.ResourceHandler. Suspends the user (Coder does not hard-delete users).

func (*ResourceUser) Get added in v2.35.0

func (ru *ResourceUser) Get(r *http.Request, idStr string) (scim.Resource, error)

Get implements scim.ResourceHandler. Returns a single user by ID.

func (*ResourceUser) GetAll added in v2.35.0

func (ru *ResourceUser) GetAll(r *http.Request, params scim.ListRequestParams) (scim.Page, error)

GetAll implements scim.ResourceHandler. Returns a paginated list of users.

func (*ResourceUser) Patch added in v2.35.0

func (ru *ResourceUser) Patch(r *http.Request, idStr string, operations []scim.PatchOperation) (scim.Resource, error)

Patch implements scim.ResourceHandler. Updates user attributes based on SCIM PatchOp operations. Currently, supports changing the active status.

func (*ResourceUser) Replace added in v2.35.0

func (ru *ResourceUser) Replace(r *http.Request, idStr string, attributes scim.ResourceAttributes) (scim.Resource, error)

Replace implements scim.ResourceHandler (PUT). Replaces user attributes. Currently only supports changing the active status per existing behavior.

Jump to

Keyboard shortcuts

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