10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
OAuthResourceOwnerPasswordRequest.h
1#ifndef TENDUKE_OAUTH_ROPG_OAUTHRESOURCEOWNERPASSWORDREQUEST_H
2#define TENDUKE_OAUTH_ROPG_OAUTHRESOURCEOWNERPASSWORDREQUEST_H
3
4#include "./ResourceOwnerPasswordCredentialsProvider.h"
5
6#include "../BaseOAuthRequest.h"
7#include "../OAuthAuthorizationRequest.h"
8#include "../OAuthConfiguration.h"
9#include "../OAuthTokenRequest.h"
10#include "../OAuthState.h"
11
12#include "http/HTTPClient.h"
13#include "json/JSONParser.h"
14#include "time/Clock.h"
15
16#include <map>
17#include <memory>
18
19namespace tenduke { namespace oauth { namespace ropg {
20
21
26{
27public:
38 const std::string& scopes,
39 const std::map<std::string, std::string> &additionalParameters,
40 const std::shared_ptr<const ::tenduke::oauth::OAuthConfiguration> &config,
41 const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient,
42 const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser,
43 const std::shared_ptr<::tenduke::time::Clock> &clock,
44 const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider
45 );
46 ~OAuthResourceOwnerPasswordRequest() override = default;
47
54 std::unique_ptr<::tenduke::oauth::OAuthState> accessTokenRequest() const;
55
56protected:
57 std::map<std::string, std::string> buildTokenRequestParameters() const override;
58
59private:
60 const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider;
61};
62
63
64}}}
65
66#endif // TENDUKE_OAUTH_ROPG_OAUTHRESOURCEOWNERPASSWORDREQUEST_H
Base OAuthRequest.
Definition BaseOAuthRequest.h:23
OAuth Resource Owner Password Credentials Grant implementation of tenduke::oauth::OAuthRequest.
Definition OAuthResourceOwnerPasswordRequest.h:26
std::unique_ptr<::tenduke::oauth::OAuthState > accessTokenRequest() const
Performs the access token request.
Definition OAuthResourceOwnerPasswordRequest.cpp:23
std::map< std::string, std::string > buildTokenRequestParameters() const override
Builds base parameters for the token request.
Definition OAuthResourceOwnerPasswordRequest.cpp:30
OAuth services.
Definition AccessTokenRequestAuthenticator.h:8
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4