0

所以我正在为 Wso2 扩展Scim Api。当我使用数据类型创建扩展时,string所有扩展都可以正常工作。但是,在我的 Ldap 中,我有很多其他自定义属性和属性,它们只使用其他数据类型而不是stringlikeoperationalTelephone Number.

我试图更改扩展属性之一的数据类型值,但是当通过 Scim Api 请求该属性时,它只会导致我出现 500 错误。

这是 scim 扩展配置的示例

[{
"attributeURI":"urn:scim:schemas:extension:enterprise:1.0:enterprise.homePhone",
"attributeName":"homePhone",
"dataType":"Telephone Number",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"The User's phone",
"schemaURI":"urn:scim:schemas:extension:enterprise:1.0",
"readOnly":"false",
"required":"false",
"caseExact":"false",
"subAttributes":"null"
},

{
"attributeURI":"urn:scim:schemas:extension:enterprise:1.0:enterprise.shareDirectory",
"attributeName":"shareDirectory",
"dataType":"string",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"The User's share dir",
"schemaURI":"urn:scim:schemas:extension:enterprise:1.0",
"readOnly":"false",
"required":"false",
"caseExact":"false",
"subAttributes":"null"
},

{
"attributeURI":"urn:scim:schemas:extension:enterprise:1.0",
"attributeName":"enterprise",
"dataType":"null",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"SCIM wso2 User Schema Extension",
"schemaURI":"urn:scim:schemas:extension:enterprise:1.0",
"readOnly":"false",
"required":"false",
"caseExact":"false",
"subAttributes":"homePhone shareDirectory"
}]

如何在我的 Scim Api 中使用这些属性?我需要一些特殊的配置吗?

4

1 回答 1

0

SCIM 支持一组数据类型。所以你必须在你的用户存储中为这些映射数据类型。

+-----------+-------------+-----------------------------------------+
| SCIM Data | SCIM Schema | JSON Type                               |
| Type      | "type"      |                                         |
+-----------+-------------+-----------------------------------------+
| String    | "string"    | String per Section 7 of [RFC7159]       |
|           |             |                                         |
| Boolean   | "boolean"   | Value per Section 3 of [RFC7159]        |
|           |             |                                         |
| Decimal   | "decimal"   | Number per Section 6 of [RFC7159]       |
|           |             |                                         |
| Integer   | "integer"   | Number per Section 6 of [RFC7159]       |
|           |             |                                         |
| DateTime  | "dateTime"  | String per Section 7 of [RFC7159]       |
|           |             |                                         |
| Binary    | "binary"    | Binary value base64 encoded per Section |
|           |             | 4 of [RFC4648], or with URL and         |
|           |             | filename safe alphabet URL per Section  |
|           |             | 5 of [RFC4648] that is passed as a JSON |
|           |             | string per Section 7 of [RFC7159]       |
|           |             |                                         |
| Reference | "reference" | String per Section 7 of [RFC7159]       |
|           |             |                                         |
| Complex   | "complex"   | Object per Section 4 of [RFC7159]       |
+-----------+-------------+-----------------------------------------+

参考:https ://www.rfc-editor.org/rfc/rfc7643#section-2.3

于 2017-08-18T17:24:45.050 回答