Wso2 Scim extentinon数据类型错误

时间:2017-08-18 14:37:29

标签: ldap wso2 wso2is scim

所以我正在为Wso2扩展Scim Api。当我使用数据类型string创建扩展时,所有扩展都能正常工作。但是在我的Ldap中,我有很多其他自定义属性和属性,只使用string之外的其他数据类型,如operationalTelephone 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中使用这些属性?我需要一些特殊的配置吗?

1 个答案:

答案 0 :(得分: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://tools.ietf.org/html/rfc7643#section-2.3