Virtru SDK for C++  2.8.0
Virtru C++ SDK library - Create, Read, and Manage TDF3 Files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
virtru_credentials_hmac.h
Go to the documentation of this file.
1 /*
2 * Copyright © 2020 Virtru Corporation
3 *
4 * SPDX - License - Identifier: MIT
5 *
6 */
7 //
8 // Virtru TDF3 SDK
9 //
10 // Created by Pat Mancuso on 2020/10/12
11 //
12 #ifndef VIRTRU_CREDENTIALS_HMAC_H_
13 #define VIRTRU_CREDENTIALS_HMAC_H_
14 
15 #include "virtru_credentials.h"
16 
17 // DEPRECATED non-OIDC flows are deprecated, and should be dropped eventually
18 namespace virtru {
19  class CredentialsHmac : public Credentials {
20  public:
25  CredentialsHmac(const std::string &userId, const std::string &apiKey, const std::string &apiSecret);
26 
27  //JAVACPPSKIPBEGIN
30 #ifndef SWIG
31  virtual std::unique_ptr<Credentials> clone() const;
32 #endif
33  //JAVACPPSKIPEND
34 
36  virtual ~CredentialsHmac();
37 
38  //JAVACPPSKIPBEGIN
46  virtual std::map<std::string, std::string> generateAuthHeaders(const std::string &url, const std::string &method, const std::string &body, const std::map<std::string, std::string> &headers, const std::string &date);
47  //JAVACPPSKIPEND
48 
50  virtual std::string getUserId() const;
51 
54  virtual std::string str() const;
55 
56  private:
57  std::string m_userId;
58  std::string m_apiKey;
59  std::string m_apiSecret;
60  };
61 } // namespace virtru
62 #endif // VIRTRU_CREDENTIALS_HMAC_H_
std::string m_apiSecret
Definition: virtru_credentials_hmac.h:59
virtual ~CredentialsHmac()
Destructor.
CredentialsHmac(const std::string &userId, const std::string &apiKey, const std::string &apiSecret)
virtual std::string getUserId() const
Get the userId associated with these credentials.
virtual std::map< std::string, std::string > generateAuthHeaders(const std::string &url, const std::string &method, const std::string &body, const std::map< std::string, std::string > &headers, const std::string &date)
std::string m_userId
Definition: virtru_credentials_hmac.h:57
virtual std::string str() const
std::string m_apiKey
Definition: virtru_credentials_hmac.h:58
Definition: virtru_credentials_hmac.h:19
Definition: virtru_credentials.h:31
virtual std::unique_ptr< Credentials > clone() const