2017-08-18 5 views
0

Donc, j'étend Scim Api pour Wso2. Lorsque je crée une extension en utilisant un type de données string toutes les extensions fonctionnent correctement. Cependant, dans mon Ldap j'ai beaucoup d'autres attributs et attributs personnalisés qui utilisent juste un autre type de données que string comme operational ou Telephone Number.Wso2 Scim extentinon erreur de type de données

J'ai essayé de changer la valeur du type de données pour l'un des attributs étendus, mais lorsque je demande cet attribut via Scim Api, cela me conduit à une erreur 500.

Voici un exemple de la configuration d'extension 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" 
}] 

Comment puis-je utiliser ces attributs dans mon Scim Api? Ai-je besoin d'une configuration spéciale?

+1

S'il vous plaît montrer que le code qui conduit à une erreur 500. – MarkusEgle

+0

Désolé, je ne suis pas sûr quelle partie interne de Wso2 provoque ce problème – nickGR

Répondre

0

Il existe un ensemble de types de données pris en charge par SCIM. Donc, vous devez mapper les types de données dans votre magasin pour ces derniers.

+-----------+-------------+-----------------------------------------+ 
| 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]  | 
+-----------+-------------+-----------------------------------------+ 

Référence: https://tools.ietf.org/html/rfc7643#section-2.3