RMS SDK for C++
0.2.1
A client library for using Microsoft RMS from Linux.
|
Represents the policy associated with protected content. More...
#include <UserPolicy.h>
Public Member Functions | |
bool | AccessCheck (const std::string &right) const |
Returns a value that indicates whether the current user has the specified right. More... | |
UserPolicyType | Type () |
Gets the policy type; template based or custom. | |
std::string | Name () |
Gets the name of the policy. | |
std::string | Description () |
Gets the policy description. | |
std::shared_ptr< modernapi::TemplateDescriptor > | TemplateDescriptor () |
Gets the template used to publish the content. | |
std::shared_ptr< modernapi::PolicyDescriptor > | PolicyDescriptor () |
Gets the policy descriptor. | |
std::string | Owner () |
Gets the email address of the content owner. | |
std::string | IssuedTo () |
Gets the user associated with the protection policy. | |
bool | IsIssuedToOwner () |
Gets the flag indicating if the current user the is the content owner. | |
std::string | ContentId () |
Gets the unique content ID associated with the protected document. | |
const AppDataHashMap | EncryptedAppData () |
Gets the encrypted app specific data. | |
const AppDataHashMap | SignedAppData () |
Gets the signed app specific data. | |
std::chrono::time_point< std::chrono::system_clock > | ContentValidUntil () |
The date the content is valid until. | |
bool | DoesUseDeprecatedAlgorithms () |
Gets the deprecated algorithms flag. | |
bool | IsAuditedExtractAllowed () |
Gets property for allowance of audited extraction. | |
const std::vector< unsigned char > | SerializedPolicy () |
Gets the serialized policy. | |
std::shared_ptr< core::ProtectionPolicy > | GetImpl () |
Gets a pointer to ProtectionPolicy. BRP072215 - meaning? More... | |
Static Public Member Functions | |
static std::shared_ptr< GetUserPolicyResult > | Acquire (const std::vector< unsigned char > &serializedPolicy, const std::string &userId, IAuthenticationCallback &authenticationCallback, IConsentCallback &consentCallback, PolicyAcquisitionOptions options, ResponseCacheFlags cacheMask) |
Acquire a policy. More... | |
static std::shared_ptr< UserPolicy > | CreateFromTemplateDescriptor (const TemplateDescriptor &templateDescriptor, const std::string &userId, IAuthenticationCallback &authenticationCallback, UserPolicyCreationOptions options, const AppDataHashMap &signedAppData) |
For publishing using templates. More... | |
static std::shared_ptr< UserPolicy > | Create (PolicyDescriptor &policyDescriptor, const std::string &userId, IAuthenticationCallback &authenticationCallback, UserPolicyCreationOptions options) |
Create a custom protection policy. More... | |
Represents the policy associated with protected content.
bool rmscore::modernapi::UserPolicy::AccessCheck | ( | const std::string & | right | ) | const |
Returns a value that indicates whether the current user has the specified right.
right | The right to check. |
|
static |
Acquire a policy.
serializedPolicy | The PL to be consumed. |
userId | The email address of the user that is trying to consume the protected content. This email address will be used to determine which policy object to use from the offline cache. If a policy object for this user is not found in the offline cache then this API will go online (if allowed) to get the policy object. If null is passed, the first policy object found in the offline cache will be used. And again if there is no policy object found for this content in the offline cache, this API will go online to get the policy object. This parameter is also used as a hint for userId for user authentication, i.e., it will be passed to the IAuthenticationCallback.GetTokenAsync() in the AuthenticationParameters structure. |
authenticationCallback | Authentication callback to be used for authentication process. |
consentCallback | Consent callback for user consent process. |
options | Offline flag |
cacheMask | Mask of caching response options from server, a combination of ResponseCacheFlags. For example if you set OnDisk and Crypted flags, the server response will be stored to disk and encrypted by a unique generated key for the current user. |
|
static |
Create a custom protection policy.
policyDescriptor | A PolicyDescriptor object which defines the policy. |
userId | The email address of the user that is protecting the content. This email address will be used to discover the RMS service instance, either ADRMS server or Azure RMS, that the user's organization is using. This parameter is also used as a hint for userId for user authentication, i.e., it will be passed to the IAuthenticationCallback.GetTokenAsync() in the AuthenticationParameters structure. |
authenticationCallback | Authentication callback to be used for authentication. |
options | Options for creating protection policy object. For more information, see UserPolicyCreationOptions. |
|
static |
For publishing using templates.
templateDescriptor | The template from which the policy is being created. |
userId | The email address of the user that is protecting the content. This email address will be used to discover the RMS service instance, either ADRMS server or Azure RMS, that the user's organization is using. This parameter is also used as a hint for userId for user authentication, i.e., it will be passed to the IAuthenticationCallback.GetTokenAsync in the AuthenticationParameters structure. |
authenticationCallback | Authentication callback to be used for the authentication process. |
options | Options for creating protection policy object. For more information, see UserPolicyCreationOptions. |
signedAppData | Singed App data to be stored with this template. |
shared_ptr< ProtectionPolicy > rmscore::modernapi::UserPolicy::GetImpl | ( | ) |
Gets a pointer to ProtectionPolicy. BRP072215 - meaning?