13 #ifndef VIRTRU_CREDENTIALS_OIDC_H_
14 #define VIRTRU_CREDENTIALS_OIDC_H_
41 const std::string &clientId,
42 const std::string &clientSecret,
43 const std::string &clientPubkey,
44 const std::string &organizationName,
45 const std::string &oidcEndpoint);
56 const std::string &refreshToken,
57 const std::string &clientPubkey,
58 const std::string &organizationName,
59 const std::string &oidcEndpoint);
72 const std::string &authorizationString,
73 const std::string &clientToken);
76 virtual std::unique_ptr<Credentials>
clone()
const;
93 const std::string &body,
94 const std::map<std::string, std::string> &headers,
95 const std::string &date);
102 virtual std::string
str()
const;
117 const std::string &clientSecret)
const;
119 std::tuple<std::string, std::string>
exchangeRefresh(
const std::string &refreshToken)
const;
121 std::tuple<std::string, std::string>
userInfo(
const std::string &accessToken)
const;
138 #endif // VIRTRU_CREDENTIALS_OIDC_H_
std::shared_ptr< INetwork > getHTTPServiceProvider() const
std::tuple< std::string, std::string > m_tokens
Definition: virtru_credentials_oidc.h:134
std::string m_oidcEndpoint
Definition: virtru_credentials_oidc.h:131
Definition: virtru_credentials_oidc.h:31
virtual OIDCHeaders 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)
OIDCHeaders m_headers
Definition: virtru_credentials_oidc.h:133
void setHTTPServiceProvider(std::weak_ptr< INetwork > httpServiceProvider)
virtual ~CredentialsOidc()
Destructor.
std::string m_clientId
Definition: virtru_credentials_oidc.h:127
CredentialsOidc(const std::string &owner, const std::string &clientId, const std::string &clientSecret, const std::string &clientPubkey, const std::string &organizationName, const std::string &oidcEndpoint)
std::tuple< std::string, std::string > exchangeCredentials(const std::string &clientId, const std::string &clientSecret) const
Definition: virtru_credentials.h:31
std::string m_orgName
Definition: virtru_credentials_oidc.h:130
std::string m_clientPubkey
Definition: virtru_credentials_oidc.h:129
std::map< std::string, std::string > OIDCHeaders
Definition: virtru_credentials_oidc.h:21
std::weak_ptr< INetwork > m_networkServiceProvider
Definition: virtru_credentials_oidc.h:126
virtual std::string str() const
virtual std::unique_ptr< Credentials > clone() const
std::string m_owner
Definition: virtru_credentials_oidc.h:132
std::tuple< std::string, std::string > userInfo(const std::string &accessToken) const
std::string getAccessToken()
std::string m_clientSecret
Definition: virtru_credentials_oidc.h:128
virtual std::string getUserId() const
Get the userId associated with these credentials.
std::tuple< std::string, std::string > exchangeRefresh(const std::string &refreshToken) const