|
10Duke Enterprise C++ Client
|
#include <OAuthResourceOwnerPasswordFlow.h>
OAuth Resource Owner Password Credentials Grant implementation of tenduke::oauth::OAuthClient.
Reference: https://datatracker.ietf.org/doc/html/rfc6749#section-4.3
The flow uses a callback, tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider, to provide the credentials.
See also tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest.
Public Member Functions | |
| OAuthResourceOwnerPasswordFlow (std::shared_ptr< const ::tenduke::oauth::OAuthConfiguration > config, std::shared_ptr< const ::tenduke::http::HTTPClient > httpClient, std::shared_ptr< const ::tenduke::json::JSONParser > jsonParser, std::shared_ptr<::tenduke::time::Clock > clock, const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &usernamePasswordProvider) | |
| Constructs new instance. | |
| virtual std::unique_ptr< const ::tenduke::oauth::ropg::OAuthResourceOwnerPasswordRequest > | authorize (const std::string &scopes) const |
| Creates the OAuth authorization request. | |
Public Member Functions inherited from tenduke::oauth::BaseOAuthClient | |
| BaseOAuthClient (std::shared_ptr< const tenduke::oauth::OAuthConfiguration > config, std::shared_ptr< const tenduke::http::HTTPClient > httpClient, std::shared_ptr< const tenduke::json::JSONParser > jsonParser, std::shared_ptr< tenduke::time::Clock > clock) | |
| Constructs new instance. | |
| std::shared_ptr< const OAuthConfiguration > | getConfiguration () const |
| Returns the configuration of this client. | |
| std::unique_ptr< const tenduke::oauth::OAuthRefreshRequest > | refresh (std::shared_ptr< tenduke::oauth::OAuthState > state) const override |
| Creates OAuthRefreshRequest for refreshing the state. | |
Additional Inherited Members | |
Protected Attributes inherited from tenduke::oauth::BaseOAuthClient | |
| const std::shared_ptr< const OAuthConfiguration > | config |
| OAuth configuration. | |
| const std::shared_ptr< const tenduke::http::HTTPClient > | httpClient |
| HTTP client. | |
| const std::shared_ptr< const tenduke::json::JSONParser > | jsonParser |
| For parsing responses. | |
| const std::shared_ptr< tenduke::time::Clock > | clock |
| Clock to generate "expires-at" from "expires-in". | |
| tenduke::oauth::ropg::OAuthResourceOwnerPasswordFlow::OAuthResourceOwnerPasswordFlow | ( | std::shared_ptr< const ::tenduke::oauth::OAuthConfiguration > | config, |
| std::shared_ptr< const ::tenduke::http::HTTPClient > | httpClient, | ||
| std::shared_ptr< const ::tenduke::json::JSONParser > | jsonParser, | ||
| std::shared_ptr<::tenduke::time::Clock > | clock, | ||
| const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider & | usernamePasswordProvider ) |
Constructs new instance.
| config | - |
| httpClient | - |
| jsonParser | - |
| clock | - |
| usernamePasswordProvider | the callback to provide login credentials |
|
virtual |
Creates the OAuth authorization request.
| scopes | - |