WSO2 scim 无法获取 lastPasswordUpdateTime
WSO2 scim can not get lastPasswordUpdateTime
无法使用 SCIM
从 WSO2 获取用户的 lastPasswordUpdateTime
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:SearchRequest"
],
"attributes": [
"emails", "groups", "name", "userName","lastPasswordUpdateTime","urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"filter": "userName eq 111111111111_222222222222",
"domain": "PRIMARY",
"startIndex": 1,
"count": 10
}
您没有在 SCIM 响应中获得 lastPasswordUpdateTime
值,因为没有映射到本地声明的 SCIM 声明 http://wso2.org/claims/identity/lastPasswordUpdateTime
您可以将 http://wso2.org/claims/identity/lastPasswordUpdateTime
映射到 SCIM 声明并按照以下步骤使用。(有关详细信息,请参阅 https://anuradha-15.medium.com/how-to-add-scim-extended-attributes-in-wso2-identity-server-71621f62c5d3)
- 转到位于
<IS_HOME>/repository/conf/
文件夹中的 scim2-schema-extension.config
文件并添加属性定义。
{
"attributeURI":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:lastPasswordUpdateTime",
"attributeName":"lastPasswordUpdateTime",
"dataType":"string",
"multiValued":"false",
"description":"Last password update time",
"required":"false",
"caseExact":"false",
"mutability":"readOnly",
"returned":"default",
"uniqueness":"none",
"subAttributes":"null",
"canonicalValues":[],
"referenceTypes":[]
}
在同一文件中,添加 lastPasswordUpdateTime
作为 urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
的子属性
重启服务器。
登录管理控制台并添加外部声明。
Dialect URI: urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
External Claim URI: urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:lastPasswordUpdateTime
(Attribute URI defined in the previous step)
Mapped Local Claim: http://wso2.org/claims/identity/lastPasswordUpdateTime
那么您的请求正文将是
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:SearchRequest"
],
"attributes": [
"emails", "groups", "name", "userName","urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.lastPasswordUpdateTime"
],
"filter": "userName eq 111111111111_222222222222",
"domain": "PRIMARY",
"startIndex": 1,
"count": 10
}
无法使用 SCIM
从 WSO2 获取用户的 lastPasswordUpdateTime{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:SearchRequest"
],
"attributes": [
"emails", "groups", "name", "userName","lastPasswordUpdateTime","urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"filter": "userName eq 111111111111_222222222222",
"domain": "PRIMARY",
"startIndex": 1,
"count": 10
}
您没有在 SCIM 响应中获得 lastPasswordUpdateTime
值,因为没有映射到本地声明的 SCIM 声明 http://wso2.org/claims/identity/lastPasswordUpdateTime
您可以将 http://wso2.org/claims/identity/lastPasswordUpdateTime
映射到 SCIM 声明并按照以下步骤使用。(有关详细信息,请参阅 https://anuradha-15.medium.com/how-to-add-scim-extended-attributes-in-wso2-identity-server-71621f62c5d3)
- 转到位于
<IS_HOME>/repository/conf/
文件夹中的scim2-schema-extension.config
文件并添加属性定义。
{
"attributeURI":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:lastPasswordUpdateTime",
"attributeName":"lastPasswordUpdateTime",
"dataType":"string",
"multiValued":"false",
"description":"Last password update time",
"required":"false",
"caseExact":"false",
"mutability":"readOnly",
"returned":"default",
"uniqueness":"none",
"subAttributes":"null",
"canonicalValues":[],
"referenceTypes":[]
}
在同一文件中,添加
的子属性lastPasswordUpdateTime
作为urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
重启服务器。
登录管理控制台并添加外部声明。
Dialect URI: urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
External Claim URI: urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:lastPasswordUpdateTime
(Attribute URI defined in the previous step)
Mapped Local Claim: http://wso2.org/claims/identity/lastPasswordUpdateTime
那么您的请求正文将是
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:SearchRequest"
],
"attributes": [
"emails", "groups", "name", "userName","urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.lastPasswordUpdateTime"
],
"filter": "userName eq 111111111111_222222222222",
"domain": "PRIMARY",
"startIndex": 1,
"count": 10
}