0

我正在尝试使用我自己的扩展声明我的 API 请求在 wso2 中创建一个具有 scim2 API 的用户 { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "name": { "familyName": "jackson", "givenName": "kim" }, "userName": "test3", "password": "abc123", "demoRole":"student", "emails": [ { "primary": true, "value": "kim.jackson@gmail.com", "type": "home" }, { "value": "kim_j@wso2.com", "type": "work" } ], "roles":[ { "value": "PRIMARY/manager" } ] }

scim2-schema-extension.config.xml 中的配置是

{ "attributeURI":"urn:ietf:params:scim:schemas:core:2.0:User:demoRole", "attributeName":"demoRole", "dataType":"string", "multiValued":"false", "description":"The displayName of the User's manager.", "required":"false", "caseExact":"false", "mutability":"readwrite", "returned":"default", "uniqueness":"none", "subAttributes":"null", "canonicalValues":[], "referenceTypes":["external"] },

我的索赔配置是

声明 URI -> urn:ietf:params:scim:schemas:core:2.0:User:demoRole

映射本地声明-> http://wso2.org/claims/demoRole

4

1 回答 1

0

您的架构扩展的属性 URI 应该是,

urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:demoRole

因此,urn:ietf:params:scim:schemas:extension:enterprise:2.0:User 的外部声明 URI 将是,

urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:demoRole

SCIM2 创建用户请求应包含 demoRole,

"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{"demoRole":"student"}

有关模式扩展表示的更多详细信息,请参阅规范

于 2019-09-24T03:14:58.567 回答