schema

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package schema provides SCIM schema definitions for discovery endpoints.

Index

Constants

View Source
const (
	URIUser           = "urn:ietf:params:scim:schemas:core:2.0:User"
	URIGroup          = "urn:ietf:params:scim:schemas:core:2.0:Group"
	URIEnterpriseUser = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
	URIListResponse   = "urn:ietf:params:scim:api:messages:2.0:ListResponse"
	URIPatchOp        = "urn:ietf:params:scim:api:messages:2.0:PatchOp"
	URIBulkRequest    = "urn:ietf:params:scim:api:messages:2.0:BulkRequest"
	URIBulkResponse   = "urn:ietf:params:scim:api:messages:2.0:BulkResponse"
	URIError          = "urn:ietf:params:scim:api:messages:2.0:Error"
)

Schema URIs for SCIM resource types.

View Source
const (
	TypeString    = "string"
	TypeBoolean   = "boolean"
	TypeDecimal   = "decimal"
	TypeInteger   = "integer"
	TypeDateTime  = "dateTime"
	TypeBinary    = "binary"
	TypeReference = "reference"
	TypeComplex   = "complex"
)

Attribute types as defined in RFC 7643 Section 2.3.

View Source
const (
	MutabilityReadOnly  = "readOnly"
	MutabilityReadWrite = "readWrite"
	MutabilityImmutable = "immutable"
	MutabilityWriteOnly = "writeOnly"
)

Mutability values as defined in RFC 7643 Section 2.2.

View Source
const (
	ReturnedAlways  = "always"
	ReturnedNever   = "never"
	ReturnedDefault = "default"
	ReturnedRequest = "request"
)

Returned values as defined in RFC 7643 Section 2.2.

View Source
const (
	UniquenessNone   = "none"
	UniquenessServer = "server"
	UniquenessGlobal = "global"
)

Uniqueness values as defined in RFC 7643 Section 2.2.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Name            string      `json:"name"`
	Type            string      `json:"type"`
	MultiValued     bool        `json:"multiValued"`
	Description     string      `json:"description,omitempty"`
	Required        bool        `json:"required"`
	CaseExact       bool        `json:"caseExact"`
	Mutability      string      `json:"mutability"`
	Returned        string      `json:"returned"`
	Uniqueness      string      `json:"uniqueness"`
	SubAttributes   []Attribute `json:"subAttributes,omitempty"`
	ReferenceTypes  []string    `json:"referenceTypes,omitempty"`
	CanonicalValues []string    `json:"canonicalValues,omitempty"`
}

Attribute represents a SCIM attribute definition.

type AuthenticationScheme

type AuthenticationScheme struct {
	Type             string `json:"type"`
	Name             string `json:"name"`
	Description      string `json:"description"`
	SpecURI          string `json:"specUri,omitempty"`
	DocumentationURI string `json:"documentationUri,omitempty"`
	Primary          bool   `json:"primary,omitempty"`
}

AuthenticationScheme describes a supported authentication method.

type BulkConfig

type BulkConfig struct {
	Supported      bool `json:"supported"`
	MaxOperations  int  `json:"maxOperations"`
	MaxPayloadSize int  `json:"maxPayloadSize"`
}

BulkConfig contains bulk operation configuration.

type FilterConfig

type FilterConfig struct {
	Supported  bool `json:"supported"`
	MaxResults int  `json:"maxResults"`
}

FilterConfig contains filter configuration.

type ResourceType

type ResourceType struct {
	ID               string            `json:"id,omitempty"`
	Name             string            `json:"name"`
	Description      string            `json:"description,omitempty"`
	Endpoint         string            `json:"endpoint"`
	Schema           string            `json:"schema"`
	SchemaExtensions []SchemaExtension `json:"schemaExtensions,omitempty"`
	Meta             *ResourceTypeMeta `json:"meta,omitempty"`
}

ResourceType represents a SCIM resource type definition as defined in RFC 7643 Section 6.

func GroupResourceType

func GroupResourceType(baseURL string) ResourceType

GroupResourceType returns the SCIM Group resource type definition.

func UserResourceType

func UserResourceType(baseURL string) ResourceType

UserResourceType returns the SCIM User resource type definition.

type ResourceTypeMeta

type ResourceTypeMeta struct {
	ResourceType string `json:"resourceType"`
	Location     string `json:"location,omitempty"`
}

ResourceTypeMeta contains resource type metadata.

type SPConfigMeta

type SPConfigMeta struct {
	ResourceType string `json:"resourceType"`
	Location     string `json:"location,omitempty"`
}

SPConfigMeta contains service provider config metadata.

type Schema

type Schema struct {
	ID          string      `json:"id"`
	Name        string      `json:"name,omitempty"`
	Description string      `json:"description,omitempty"`
	Attributes  []Attribute `json:"attributes,omitempty"`
	Meta        *SchemaMeta `json:"meta,omitempty"`
}

Schema represents a SCIM schema definition as defined in RFC 7643 Section 7.

func EnterpriseUserSchema

func EnterpriseUserSchema() Schema

EnterpriseUserSchema returns the SCIM Enterprise User extension schema definition.

func GroupSchema

func GroupSchema() Schema

GroupSchema returns the SCIM Group schema definition.

func UserSchema

func UserSchema() Schema

UserSchema returns the SCIM User schema definition.

type SchemaExtension

type SchemaExtension struct {
	Schema   string `json:"schema"`
	Required bool   `json:"required"`
}

SchemaExtension represents a schema extension for a resource type.

type SchemaMeta

type SchemaMeta struct {
	ResourceType string `json:"resourceType"`
	Location     string `json:"location,omitempty"`
}

SchemaMeta contains schema metadata.

type ServiceProviderConfig

type ServiceProviderConfig struct {
	Schemas               []string               `json:"schemas"`
	DocumentationURI      string                 `json:"documentationUri,omitempty"`
	Patch                 SupportedFeature       `json:"patch"`
	Bulk                  BulkConfig             `json:"bulk"`
	Filter                FilterConfig           `json:"filter"`
	ChangePassword        SupportedFeature       `json:"changePassword"`
	Sort                  SupportedFeature       `json:"sort"`
	Etag                  SupportedFeature       `json:"etag"`
	AuthenticationSchemes []AuthenticationScheme `json:"authenticationSchemes"`
	Meta                  *SPConfigMeta          `json:"meta,omitempty"`
}

ServiceProviderConfig represents the SCIM service provider configuration as defined in RFC 7643 Section 5.

type SupportedFeature

type SupportedFeature struct {
	Supported bool `json:"supported"`
}

SupportedFeature indicates whether a feature is supported.

Jump to

Keyboard shortcuts

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