ProtectionDescriptor 类

与内容片段关联的保护说明。

总结

成员 说明
public ProtectionType GetProtectionType() const 获取保护类型,无论它是否源自保护 SDK 模板。
public std::string GetOwner() const 获取保护的所有者。
public std::string GetName() const 获取保护名称。
public std::string GetDescription() const 获取保护说明。
public std::string GetTemplateId() const 获取保护模板 ID(如果有)。
public LabelInfo GetLabelInfo() const 获取标签信息(如果有)。
public std::string GetLabelId() const 获取标签 ID(如果有)。
public std::string GetContentId() const 获取内容 ID(如有)。
public std::vector<UserRights> GetUserRights() const 获取用户到权限映射的集合。
public std::vector<UserRoles> GetUserRoles() const 获取用户到角色映射的集合。
public bool DoesContentExpire() const 检查内容是否具有过期时间。
public std::chrono::time_point<std::chrono::system_clock> GetContentValidUntil() const 获取保护过期时间。
public bool DoesAllowOfflineAccess() const 获取保护是否允许脱机内容访问。
public std::string GetReferrer() const 获取保护引用地址。
public std::map<std::string, std::string> GetEncryptedAppData() const 获取已加密的应用特定数据。
public std::map<std::string, std::string> GetSignedAppData() const 获取已签名的应用特定数据。
public std::string GetDoubleKeyUrl() const 获取用于自定义保护的双密钥 URL。
public std::shared_ptr<const std::vector<uint8_t>> GetSerializedTemplate() const 获取序列化的模板(如果有)。

成员

GetProtectionType 函数

获取保护类型,无论它是否源自保护 SDK 模板。

返回:保护类型

GetOwner 函数

获取保护的所有者。

返回:保护所有者

GetName 函数

获取保护名称。

返回:保护名称

GetDescription 函数

获取保护说明。

返回:保护说明

GetTemplateId 函数

获取保护模板 ID(如果有)。

返回结果:模板 ID

GetLabelInfo 函数

获取标签信息(如果有)。

返回:标签信息 此属性将在 ProtectionDescriptors 中填充,以便预先存在的受保护内容和基于 UDP 标签的保护。 它是服务器在使用受保护内容时填充的字段。 对于基于 UDP 标签的保护,它从客户端设置的标签和租户 ID 值填充。

GetLabelId 函数

获取标签 ID(如果有)。

返回:标签 ID 此属性将在 ProtectionDescriptors 中填充,以便预先存在的受保护内容和基于 UDP 标签的保护。 它是服务器在使用受保护内容时填充的字段。 对于基于 UDP 标签的保护,从客户端设置的 labelId 值填充它。

GetContentId 函数

获取内容 ID(如有)。

返回:内容 ID 发布许可证将包含此标识符,用大括号“”{}括起来。 这些大括号将从此处返回的值中删除

GetUserRights 函数

获取用户到权限映射的集合。

返回:用户到权限映射的集合:如果当前用户无权访问此信息(即用户不是所有者且没有 VIEWRIGHTSDATA 权限),则 UserRights 属性的值将为空。

GetUserRoles 函数

获取用户到角色映射的集合。

返回:用户到角色映射的集合

DoesContentExpire 函数

检查内容是否具有过期时间。

返回结果:如果内容可以过期则为 True;否则为 False。

GetContentValidUntil 函数

获取保护过期时间。

返回:保护过期时间

DoesAllowOfflineAccess 函数

获取保护是否允许脱机内容访问。

返回:如果保护允许脱机内容访问(默认值 = true)

GetReferrer 函数

获取保护引用地址。

返回:保护引用者地址 引用者是一个 URI,如果用户无法取消保护内容,则向用户显示该 URI。 它包含有关该用户如何获得访问内容权限的信息。

GetEncryptedAppData 函数

获取已加密的应用特定数据。

返回结果:特定于应用的数据 A ProtectionHandler 可以保存由保护服务加密的应用特定数据的字典。 此加密数据独立于可通过 ProtectionDescriptor::GetSignedAppData 访问的已签名数据

GetSignedAppData 函数

获取已签名的应用特定数据。

返回结果:特定于应用的数据 A ProtectionHandler 可以保存由保护服务签名的应用特定数据的字典。 此签名数据独立于可通过 ProtectionDescriptor::GetEncryptedAppData 访问的加密数据

GetDoubleKeyUrl 函数

获取用于自定义保护的双密钥 URL。

返回:双键 URL:自定义请求中使用的双键 URL,用于使用第二个密钥保护信息。 密钥生成需要。

GetSerializedTemplate 函数

获取序列化的模板(如果有)。

返回:序列化模板