p≡p JSON adapter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
423 B

  1. #ifndef SECURITY_TOKEN_HH
  2. #define SECURITY_TOKEN_HH
  3. #include <string>
  4. std::string create_random_token(unsigned length=38);
  5. // deletes the token file, if it exists
  6. void remove_token_file();
  7. // creates a file with restrictive access rights that contains a security token and returns that token, too
  8. std::string create_security_token(const std::string& server_address, unsigned port_nr, const std::string& path);
  9. #endif