def resource_type_dict(cls, request=None):
"""
Return a ``dict`` containing ResourceType metadata for the user object.
"""
id_ = cls.resource_type
path = reverse('scim:resource-types', kwargs={'uuid': id_})
location = urljoin(get_base_scim_location_getter()(request), path)
return {
'schemas': [constants.SchemaURI.RESOURCE_TYPE],
'id': id_,
'name': 'User',
'endpoint': reverse('scim:users'),
'description': 'User Account',
'schema': constants.SchemaURI.USER,
'meta': {
'location': location,
'resourceType': 'ResourceType'
}
}
评论列表
文章目录