Esempio n. 1
0
 /// <summary>
 /// This method will block a specific license key to ensure that the key cannot be
 /// accessible by most of the methods in the Web API (activation, validation,
 /// optional field, and deactivation).Note, blocking the key will still allow you
 /// to access the key in Web API 3, unless otherwise stated for a given Web API 3 method.
 /// To do the reverse, please see <see cref="UnblockKey(string, KeyLockModel)"/>.
 /// </summary>
 /// <param name="token">The access token (https://app.cryptolens.io/User/AccessToken#/) with Block key permission.</param>
 /// <param name="parameters">The parameters that the method needs.</param>
 /// <remarks>This method may, in rare cases, return null if an error has occurred.
 /// Null should be seen as an unsuccessful result.
 /// </remarks>
 /// <returns>A BasicResult object or null.</returns>
 public static KeyInfoResult BlockKey(string token, KeyLockModel parameters)
 {
     return(HelperMethods.SendRequestToWebAPI3 <KeyInfoResult>(parameters, "/key/blockkey/", token));
 }
Esempio n. 2
0
 /// <summary>
 /// This method will unblock a specific license key to ensure that the key can be
 /// accessible by most of the methods in the Web API (activation, validation,
 /// optional field, and deactivation). To do the reverse, please see <see cref="BlockKey(string, KeyLockModel)"/>.
 /// </summary>
 /// <param name="token">The access token (https://app.cryptolens.io/User/AccessToken#/) with Unblock key permission.</param>
 /// <param name="parameters">The parameters that the method needs.</param>
 /// <remarks>This method may, in rare cases, return null if an error has occurred.
 /// Null should be seen as an unsuccessful result.
 /// </remarks>
 /// <returns>A BasicResult object or null.</returns>
 public static BasicResult UnblockKey(string token, KeyLockModel parameters)
 {
     return(HelperMethods.SendRequestToWebAPI3 <BasicResult>(parameters, "/key/unblockkey/", token));
 }
Esempio n. 3
0
 /// <summary>
 /// This method will, given a license key, generate a new access token
 /// that is locked to that particular key and return the Id of that key.
 /// The scope of the access token is preserved (i.e. all methods that were
 /// enabled in the access token used to access this method will be copied
 /// to the new access token) except for the key lock, which is going to be
 /// changed to the id of the license key. Note, for this method to work,
 /// the access token used to access this method has to have key lock set
 /// to -1. All of these details are described in Remarks.
 /// </summary>
 /// <param name="token">The access token. Read more at https://serialkeymanager.com/docs/api/v3/Auth </param>
 /// <param name="parameters">The parameters that the method needs</param>
 /// <remarks>Note: for more details, please see
 /// <a href="https://serialkeymanager.com/docs/api/v3/KeyLock">https://serialkeymanager.com/docs/api/v3/KeyLock</a> <br/>
 /// </remarks>
 /// <returns>Returns <see cref="KeyLockResult"/> or null.</returns>
 public static KeyLockResult KeyLock(string token, KeyLockModel parameters)
 {
     return(HelperMethods.SendRequestToWebAPI3 <KeyLockResult>(parameters, "/auth/keylock/", token));
 }