Exemple #1
0
def reset_user(email, public_key, **kwargs):
    """
   Reset a user: set a new certificate.

   Positional arguments:
      email (str):
         The email of the desired user. 

      public_key (str):
         Path to the new public key for the user (PEM-encoded
         4096-bit RSA key).  Pass 'auto' to automatically
         generate a new key pair, and store the private key in
         your Syndicate key directory.

   Returns:
      True on success, or an exception if the user does 
      not exist or the caller is not authorized to set 
      the API field.
   
   Authorization:
      Only an administrator can call this method.
      
   Remarks:
      Syndicate implicitly passes 'user_cert_b64' as a keyword argument,
      which contains a serialized certificate signed by the admin that 
      contains the email and new public key.  It must be signed by an
      admin.
   """
    return storage.reset_user(email, **kwargs)
Exemple #2
0
def reset_user(email, public_key, **kwargs):
    """
   Reset a user: set a new certificate.

   Positional arguments:
      email (str):
         The email of the desired user. 

      public_key (str):
         Path to the new public key for the user (PEM-encoded
         4096-bit RSA key).  Pass 'auto' to automatically
         generate a new key pair, and store the private key in
         your Syndicate key directory.

   Returns:
      True on success, or an exception if the user does 
      not exist or the caller is not authorized to set 
      the API field.
   
   Authorization:
      Only an administrator can call this method.
      
   Remarks:
      Syndicate implicitly passes 'user_cert_b64' as a keyword argument,
      which contains a serialized certificate signed by the admin that 
      contains the email and new public key.  It must be signed by an
      admin.
   """
    return storage.reset_user(email, **kwargs)
Exemple #3
0
def reset_user( email, password, **kwargs ):
   """
   Reset a user's account credentials.  Set a new one-time-use registration key,
   so the user can re-upload a public signing key.
   
   Positional arguments:
      email (str):
         The email of the desired user. 
      
      registration_password (str):
         A one-time-use password the user will use to 
         register a new signing public key.
         
   Returns:
      True on success, or an exception if the user does 
      not exist or the caller is not authorized to set 
      the API field.
   
   Authorization:
      Only an administrator can call this method.
      
   Remarks:
      Syndicate does not send a value for registration_password.
      It instead sends 'user_cert_b64' as a keyword argument, which 
      contains a serialized certificate signed by the admin that 
      contains the email and registration password hash and salt.
   """
   return storage.reset_user( email, **kwargs )