10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
ROPGAuthenticationConfig.h
1
#ifndef TENDUKE_OIDC_ROPG_ROPGAUTHENTICATIONCONFIG_H
2
#define TENDUKE_OIDC_ROPG_ROPGAUTHENTICATIONCONFIG_H
3
4
#include "../BaseOIDCAuthenticationConfig.h"
5
#include "oauth/ropg/ResourceOwnerPasswordCredentialsProvider.h"
6
#include <cstdint>
7
8
namespace
tenduke
{
namespace
oidc
{
namespace
ropg {
9
10
class
ROPGAuthenticationConfig
:
public
BaseOIDCAuthenticationConfig
11
{
12
public
:
13
static
constexpr
std::uint32_t DEFAULT_LOGIN_ATTEMPTS = 0;
14
static
constexpr
std::uint32_t UNLIMITED_LOGIN_ATTEMPTS = UINT32_MAX;
15
16
public
:
27
ROPGAuthenticationConfig
(
28
const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider,
29
std::string
oauthClientId
,
30
std::string
oauthClientSecret
= {},
31
const
std::uint32_t maxLoginAttempts = DEFAULT_LOGIN_ATTEMPTS,
32
::tenduke::oidc::OIDCSessionConfiguration
oidcSessionConfiguration
= {},
33
std::string
scopes
= {}
34
) : BaseOIDCAuthenticationConfig(
35
std::move(
oauthClientId
),
36
std::move(
oauthClientSecret
),
37
std::move(
oidcSessionConfiguration
),
38
std::move(
scopes
)
39
)
40
, credentialsProvider(credentialsProvider)
41
, maxLoginAttempts(maxLoginAttempts)
42
{}
43
48
std::uint32_t
getMaxLoginAttempts
()
const
49
{
50
return
(maxLoginAttempts == DEFAULT_LOGIN_ATTEMPTS ? UNLIMITED_LOGIN_ATTEMPTS : maxLoginAttempts);
51
}
52
53
public
:
54
const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider;
55
const
std::uint32_t maxLoginAttempts;
56
};
57
58
}}}
59
60
#endif
//TENDUKE_OIDC_ROPG_ROPGAUTHENTICATIONCONFIG_H
ROPGAuthenticationConfig::ROPGAuthenticationConfig
ROPGAuthenticationConfig(const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider, std::string oauthClientId, std::string oauthClientSecret={}, const std::uint32_t maxLoginAttempts=DEFAULT_LOGIN_ATTEMPTS, ::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration={}, std::string scopes={})
Creates a new instance.
Definition
ROPGAuthenticationConfig.h:27
tenduke::oidc::BaseOIDCAuthenticationConfig::oauthClientId
const std::string oauthClientId
OAuth client id.
Definition
BaseOIDCAuthenticationConfig.h:28
tenduke::oidc::BaseOIDCAuthenticationConfig::scopes
const std::string scopes
OAuth/OIDC scopes to authorize.
Definition
BaseOIDCAuthenticationConfig.h:39
tenduke::oidc::BaseOIDCAuthenticationConfig::oauthClientSecret
const std::string oauthClientSecret
OAuth client secret.
Definition
BaseOIDCAuthenticationConfig.h:33
tenduke::oidc::BaseOIDCAuthenticationConfig::oidcSessionConfiguration
const ::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration
OIDC session configuration.
Definition
BaseOIDCAuthenticationConfig.h:36
tenduke::oidc::OIDCSessionConfiguration
Configuration for tenduke::oidc::OIDCSessionImpl.
Definition
OIDCSessionConfiguration.h:16
tenduke::oidc::ropg::ROPGAuthenticationConfig::ROPGAuthenticationConfig
ROPGAuthenticationConfig(const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider, std::string oauthClientId, std::string oauthClientSecret={}, const std::uint32_t maxLoginAttempts=DEFAULT_LOGIN_ATTEMPTS, ::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration={}, std::string scopes={})
Creates a new instance.
Definition
ROPGAuthenticationConfig.h:27
tenduke::oidc::ropg::ROPGAuthenticationConfig::getMaxLoginAttempts
std::uint32_t getMaxLoginAttempts() const
Returns maximum number of login attempts.
Definition
ROPGAuthenticationConfig.h:48
tenduke::oidc
Implementation of OpenID Connect protocol.
Definition
AutoDiscovery.h:18
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
oidc
core
src
oidc
ropg
ROPGAuthenticationConfig.h
Generated by
1.17.0