10Duke Enterprise C++ Client
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
8namespace tenduke { namespace oidc { namespace ropg {
9
11{
12public:
13 static const std::uint32_t DEFAULT_LOGIN_ATTEMPTS = 0;
14 static const std::uint32_t UNLIMITED_LOGIN_ATTEMPTS = UINT32_MAX;
15
16public:
28 const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider,
29 const std::string &oauthClientId,
30 const std::string &oauthClientSecret = {},
31 const std::uint32_t maxLoginAttempts = DEFAULT_LOGIN_ATTEMPTS,
32 const ::tenduke::oidc::OIDCSessionConfiguration &oidcSessionConfiguration = {},
33 const std::string &scopes = {}
34 ) : BaseOIDCAuthenticationConfig(oauthClientId, oauthClientSecret, oidcSessionConfiguration, scopes)
35 , credentialsProvider(credentialsProvider)
36 , maxLoginAttempts(maxLoginAttempts)
37 {}
38
43 std::uint32_t getMaxLoginAttempts() const
44 {
45 return (maxLoginAttempts == DEFAULT_LOGIN_ATTEMPTS ? UNLIMITED_LOGIN_ATTEMPTS : maxLoginAttempts);
46 }
47
48public:
49 const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider;
50 const std::uint32_t maxLoginAttempts;
51};
52
53}}}
54
55#endif //TENDUKE_OIDC_ROPG_ROPGAUTHENTICATIONCONFIG_H
Definition BaseOIDCAuthenticationConfig.h:11
Definition ROPGAuthenticationConfig.h:11
ROPGAuthenticationConfig(const ::tenduke::oauth::ropg::ResourceOwnerPasswordCredentialsProvider &credentialsProvider, const std::string &oauthClientId, const std::string &oauthClientSecret={}, const std::uint32_t maxLoginAttempts=DEFAULT_LOGIN_ATTEMPTS, const ::tenduke::oidc::OIDCSessionConfiguration &oidcSessionConfiguration={}, const std::string &scopes={})
Creates new instance.
Definition ROPGAuthenticationConfig.h:27
std::uint32_t getMaxLoginAttempts() const
Returns maximum number of login attempts.
Definition ROPGAuthenticationConfig.h:43
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4