10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
OAuthResourceOwnerPasswordFlow.h
1#ifndef TENDUKE_OAUTH_ROPG_OAUTHRESOURCEOWNERPASSWORDFLOW_H
2#define TENDUKE_OAUTH_ROPG_OAUTHRESOURCEOWNERPASSWORDFLOW_H
3
4#include "./OAuthResourceOwnerPasswordRequest.h"
5#include "./ResourceOwnerPasswordCredentialsProvider.h"
6
7#include "../BaseOAuthClient.h"
8#include "../OAuthConfiguration.h"
9
10#include "http/HTTPClient.h"
11#include "json/JSONParser.h"
12#include "time/Clock.h"
13
14#include <memory>
15#include <string>
16
17namespace tenduke { namespace oauth { namespace ropg {
18
30{
31public:
41 std::shared_ptr<const ::tenduke::oauth::OAuthConfiguration> config,
42 std::shared_ptr<const ::tenduke::http::HTTPClient> httpClient,
43 std::shared_ptr<const ::tenduke::json::JSONParser> jsonParser,
44 std::shared_ptr<::tenduke::time::Clock> clock,
45 const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &usernamePasswordProvider
46 );
47
53 virtual std::unique_ptr<const ::tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest> authorize(const std::string &scopes) const;
54
55private:
56 const std::shared_ptr<const OAuthConfiguration> config;
57 const std::shared_ptr<const ::tenduke::http::HTTPClient> httpClient;
58 const std::shared_ptr<const ::tenduke::json::JSONParser> jsonParser;
59 const std::shared_ptr<::tenduke::time::Clock> clock;
60 const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &usernamePasswordProvider;
61};
62
63
64}}}
65
66#endif // TENDUKE_OAUTH_ROPG_OAUTHRESOURCEOWNERPASSWORDFLOW_H
Base class for OAuth-clients.
Definition BaseOAuthClient.h:27
OAuth Resource Owner Password Credentials Grant implementation of tenduke::oauth::OAuthClient.
Definition OAuthResourceOwnerPasswordFlow.h:30
virtual std::unique_ptr< const ::tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest > authorize(const std::string &scopes) const
Creates the OAuth authorization request.
Definition OAuthResourceOwnerPasswordFlow.cpp:22
OAuth services.
Definition AccessTokenRequestAuthenticator.h:8
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4