scim

package
v1.481.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UserExtensionKey = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
)

Variables

View Source
var (
	UserStringField = []schema.SimpleParams{
		newStringParams("externalId", false, true),
		newStringParams("userName", true, true),
		newStringParams("password", false, false),
		newStringParams("displayName", false, false),
		newStringParams("profileUrl", false, false),
		newStringParams("userType", false, false),
	}
	UserComplexField = []schema.ComplexParams{
		newComplexParams("name", false, false, []schema.SimpleParams{
			newStringParams("givenName", false, false),
			newStringParams("familyName", false, false),
		}),
		newComplexParams("emails", false, true, []schema.SimpleParams{
			newStringParams("value", true, false),
		}),
		newComplexParams("phoneNumbers", false, true, []schema.SimpleParams{
			newStringParams("value", true, false),
		}),
		newComplexParams("photos", false, true, []schema.SimpleParams{
			newStringParams("value", true, false),
		}),
		newComplexParams("addresses", false, true, []schema.SimpleParams{
			newStringParams("locality", false, false),
			newStringParams("region", false, false),
			newStringParams("country", false, false),
		}),
	}
	Server = GetScimServer()
)

Functions

func AddScimUser

func AddScimUser(r *scim.Resource) error

func GetScimServer

func GetScimServer() scim.Server

func GetScimUser

func GetScimUser(id string) (*scim.Resource, error)

func ToString

func ToString(v interface{}, defaultV ...interface{}) string

func UpdateScimUser

func UpdateScimUser(id string, r *scim.Resource) error

func UpdateScimUserByPatchOperation

func UpdateScimUserByPatchOperation(id string, ops []scim.PatchOperation) (r scim.Resource, err error)

https://datatracker.ietf.org/doc/html/rfc7644#section-3.5.2 Modifying with PATCH

Types

type AnyArray

type AnyArray []interface{}

func ToAnyArray

func ToAnyArray(v interface{}, defaultV ...interface{}) AnyArray

type AnyMap

type AnyMap map[string]interface{}

func ToAnyMap

func ToAnyMap(v interface{}, defaultV ...interface{}) AnyMap

type UserResourceHandler

type UserResourceHandler struct{}

func (UserResourceHandler) Create

func (UserResourceHandler) Delete

func (h UserResourceHandler) Delete(r *http.Request, id string) error

func (UserResourceHandler) Get

func (UserResourceHandler) GetAll

func (UserResourceHandler) Patch

func (h UserResourceHandler) Patch(r *http.Request, id string, operations []scim.PatchOperation) (scim.Resource, error)

func (UserResourceHandler) Replace

Jump to

Keyboard shortcuts

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