10Duke Enterprise C++ Client
|
#include <AbstractClientFactory.h>
Class template for factories, which create 10Duke client.
P | type of the configuration parameters |
Public Member Functions | |
AbstractClientFactory (const std::string &clientId, const ::tenduke::ServiceConfiguration &serviceConfiguration=::tenduke::ServiceConfiguration()) | |
Constructs new instance with default services. | |
AbstractClientFactory (const ::tenduke::TendukeServices &services) | |
Constructs new instance with given services. | |
virtual std::unique_ptr<::tenduke::ee::TendukeClient > | createClient (const ::tenduke::ee::ClientProperties &clientProperties, const std::string &serviceUrl, const ::tenduke::oauth::OAuthBackendConfiguration &oauthBackendConfiguration, const ::tenduke::oidc::OIDCConfiguration &oidcConfiguration, const P &authenticationConfiguration, const std::string &initialStateAsJSON={}) const |
Creates client for 10Duke Enterprise from manually provided parameters. | |
std::unique_ptr<::tenduke::ee::TendukeClient > | createClientUsingAutodiscovery (const ::tenduke::ee::ClientProperties &clientProperties, const std::string &serviceUrl, const P &authenticationConfiguration, const std::string &initialStateAsJSON={}) const |
Creates client for 10Duke Enterprise, using OIDC autodiscovery for OAuth and OIDC parameters. | |
Protected Member Functions | |
virtual std::shared_ptr<::tenduke::oidc::OIDCLogin > | createOIDCLoginService (const std::shared_ptr< const ::tenduke::oauth::OAuthConfiguration > &oauthConfig, const std::shared_ptr< const ::tenduke::oidc::OIDCConfiguration > &oidcConfig, const P &authenticationConfig) const =0 |
Creates the authentication-specific OIDC login service. | |
virtual std::shared_ptr<::tenduke::oauth::OAuthConfiguration > | mkOAuthConfiguration (const ::tenduke::oauth::OAuthBackendConfiguration &oauthBackendConfig, const P &authenticationConfig) const =0 |
Creates full OAuth-configuration. | |
virtual std::shared_ptr<::tenduke::ee::licensing::LicensingConfiguration > | mkLicensingConfiguration (const std::string &serviceUrl, const ::tenduke::ee::ClientProperties &clientProperties, const ::tenduke::oidc::OIDCConfiguration &oidcConfig) const |
Creates licensing configuration from provided parameters. | |
virtual void | dumpAutodiscoveryResult (const ::tenduke::oidc::AutoDiscovery &service, const ::tenduke::oidc::AutoDiscoveryResult &result) const |
Dumps OIDC autodiscovery result to log, using DEBUG log level. | |
Protected Attributes | |
::tenduke::TendukeServices | services |
|
inline |
Constructs new instance with default services.
clientId | Identifier of the client. Used mainly as HTTP user-agent. This value is very useful when analysing or troubleshooting activity from access logs. We recommend that value is relatively short and contains short application identifier, version and platform identifier. Use "HTTP-friendly"-characters, e.g. [0-9A-Z a-z .-_~/]. Example: the-app/1.0.0/win11 |
serviceConfiguration | Configuration for the underlying services. Optional. |
|
inlineexplicit |
Constructs new instance with given services.
This allows constructing the factory with custom services.
services | - Custom service implementation(s). |
|
inlinevirtual |
Creates client for 10Duke Enterprise from manually provided parameters.
clientProperties | Properties of the client. |
serviceUrl | URL of the deployment. Usually something like: https://your-company-name.10duke.com |
oauthBackendConfiguration | OAuth server configuration. |
oidcConfiguration | OIDC-configuration. |
authenticationConfiguration | Authentication type specific configuration. Different authentication methods take different parameters. The concrete client factory defines the parameters it takes. |
initialStateAsJSON | Previously stored state, if any. Once the user has successfully logged in, the state can be persisted so that the user does not have to execute every time the application is started. If there is no previous state, pass empty string, which forces the authentication to execute on first licensing request. See TendukeClient.serializeState(). |
|
inline |
Creates client for 10Duke Enterprise, using OIDC autodiscovery for OAuth and OIDC parameters.
The OIDC autodiscovery is performed over network with a HTTP-call.
clientProperties | Properties of the client. |
serviceUrl | URL of the deployment. |
authenticationConfiguration | Authentication type specific configuration. Different authentication methods take different parameters. The concrete client factory defines the parameters it takes. |
initialStateAsJSON | Previously stored state, if any. Once the user has successfully logged in, the state can be persisted so that the user does not have to execute every time the application is started. If there is no previous state, pass empty string, which forces the authentication to execute on first licensing request. See TendukeClient.serializeState(). |
|
protectedpure virtual |
Creates the authentication-specific OIDC login service.
oauthConfig | - |
oidcConfig | - |
authenticationConfig | - |
Implemented in tenduke::ee::CCGClientFactory, tenduke::ee::DeviceAuthenticationClientFactory, tenduke::ee::BrowserBasedClientFactory, and tenduke::ee::ROPGClientFactory.
|
inlineprotectedvirtual |
Dumps OIDC autodiscovery result to log, using DEBUG log level.
service | - |
result | - |
|
inlineprotectedvirtual |
Creates licensing configuration from provided parameters.
serviceUrl | - |
clientProperties | - |
oidcConfig | - |
|
protectedpure virtual |
Creates full OAuth-configuration.
oauthBackendConfig | - |
authenticationConfig | - |
Implemented in tenduke::ee::CCGClientFactory, tenduke::ee::DeviceAuthenticationClientFactory, tenduke::ee::BrowserBasedClientFactory, and tenduke::ee::ROPGClientFactory.