Class: SCIMMY.Types.Attribute
SCIM Attribute Type
Description
Summary:
- Defines a SCIM schema attribute, and is used to ensure a given resource's value conforms to the attribute definition.
Usage
Constructs an instance of a full SCIM attribute definition
new SCIMMY.Types.Attribute(type, name, configopt, subAttributesopt)
Parameters:
Name | Type | Description |
---|---|---|
type
|
~ValidAttributeTypes
|
the data type of the attribute |
name
|
String
|
the actual name of the attribute |
configopt
|
~AttributeConfig
|
additional config defining the attribute's characteristics |
subAttributesopt
|
SCIMMY.Types.Attribute[]
|
if the attribute is complex, the sub-attributes of the attribute |
Properties:
Name | Type | Description |
---|---|---|
type
|
~ValidAttributeTypes
|
the data type of the attribute |
name
|
String
|
the actual name of the attribute |
config
|
~AttributeConfig
|
additional config defining the attribute's characteristics |
subAttributesopt
|
SCIMMY.Types.Attribute[]
|
if the attribute is complex, the sub-attributes of the attribute |
Methods
truncate(subAttributes) → {SCIMMY.Types.Attribute}
Remove a subAttribute from a complex attribute definition
Parameters:
Name | Type | Description |
---|---|---|
subAttributes
|
String
SCIMMY.Types.Attribute
|
the child attributes to remove from the complex attribute definition |
Returns:
this attribute instance for chaining
toJSON() → {~AttributeDefinition}
Parse this Attribute instance into a valid SCIM attribute definition object
Returns:
an object representing a valid SCIM attribute definition
coerce(source, directionopt, isComplexMultiValueopt) → {String|String[]|Number|Boolean|Object|Object[]}
Coerce a given value by making sure it conforms to attribute's characteristics
Parameters:
Name | Type | Default | Description |
---|---|---|---|
source
|
any
any[]
|
|
value to coerce and confirm conformity with attribute's characteristics |
directionopt
|
String
|
|
whether to check for inbound, outbound, or bidirectional attributes |
isComplexMultiValueopt
|
Boolean
|
|
indicates whether a coercion is for a single complex value in a collection of complex values |
Returns:
the coerced value, conforming to attribute's characteristics
Type Definitions
AttributeConfig
SCIMMY Attribute Instance Configuration properties
- Type:
- {Object}
Properties:
Name | Type | Default | Description |
---|---|---|---|
multiValuedopt
|
Boolean
|
|
does the attribute expect a collection of values |
descriptionopt
|
String
|
|
a human-readable description of the attribute |
requiredopt
|
Boolean
|
|
whether the attribute is required for the type instance to be valid |
canonicalValuesopt
|
Boolean
String[]
|
|
values the attribute's contents must be set to |
caseExactopt
|
Boolean
|
|
whether the attribute's contents is case-sensitive |
mutableopt
|
Boolean
String
|
|
whether the attribute's contents is modifiable |
returnedopt
|
Boolean
String
|
|
whether the attribute is returned in a response |
referenceTypesopt
|
Boolean
String[]
|
|
list of referenced types if attribute type is reference |
uniquenessopt
|
String
Boolean
|
|
the attribute's uniqueness characteristic |
directionopt
|
String
|
|
whether the attribute should be present for inbound, outbound, or bidirectional requests |
shadowopt
|
Boolean
|
|
whether the attribute should be hidden from schemas presented by the resource type endpoint |
AttributeDefinition
SCIM Attribute Definition properties
- Type:
- {Object}
Properties:
Name | Type | Description |
---|---|---|
name
|
String
|
the attribute's name |
type
|
~ValidAttributeTypes
|
the attribute's data type |
referenceTypesopt
|
String[]
|
specifies a SCIM resourceType that a reference attribute may refer to |
multiValued
|
Boolean
|
boolean value indicating an attribute's plurality |
description
|
String
|
a human-readable description of the attribute |
required
|
Boolean
|
boolean value indicating whether the attribute is required |
subAttributesopt
|
~AttributeDefinition[]
|
defines the sub-attributes of a complex attribute |
caseExactopt
|
Boolean
|
boolean value indicating whether a string attribute is case-sensitive |
canonicalValuesopt
|
String[]
|
collection of canonical values |
mutability
|
String
|
indicates whether an attribute is modifiable |
returned
|
String
|
indicates when an attribute is returned in a response |
uniquenessopt
|
String
|
indicates how unique a value must be |
Constants
(inner) ValidAttributeTypes
Collection of valid attribute type characteristic's values
- Values:
["string","complex","boolean","binary","decimal","integer","dateTime","reference"]
(inner) ValidMutabilityValues
Collection of valid attribute mutability characteristic's values
- Values:
["readOnly","readWrite","immutable","writeOnly"]
(inner) ValidReturnedValues
Collection of valid attribute returned characteristic's values
- Values:
["always","never","default","request"]
(inner) ValidUniquenessValues
Collection of valid attribute uniqueness characteristic's values
- Values:
["none","server","global"]