Documentation
¶
Index ¶
- type Handler
- type Options
- type ResourceUser
- func (ru *ResourceUser) Create(r *http.Request, attributes scim.ResourceAttributes) (scim.Resource, error)
- func (ru *ResourceUser) Delete(r *http.Request, idStr string) error
- func (ru *ResourceUser) Get(r *http.Request, idStr string) (scim.Resource, error)
- func (ru *ResourceUser) GetAll(r *http.Request, params scim.ListRequestParams) (scim.Page, error)
- func (ru *ResourceUser) Patch(r *http.Request, idStr string, operations []scim.PatchOperation) (scim.Resource, error)
- func (ru *ResourceUser) Replace(r *http.Request, idStr string, attributes scim.ResourceAttributes) (scim.Resource, error)
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.
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
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.