| #pragma once |
| #include <cstdint> |
| #include <nlohmann/json.hpp> |
| |
| namespace account_service |
| { |
| // clang-format off |
| |
| enum class MFABypassType : std::uint8_t{ |
| Invalid, |
| All, |
| SecurID, |
| GoogleAuthenticator, |
| MicrosoftAuthenticator, |
| ClientCertificate, |
| OEM, |
| }; |
| |
| enum class LocalAccountAuth : std::uint8_t{ |
| Invalid, |
| Enabled, |
| Disabled, |
| Fallback, |
| LocalFirst, |
| }; |
| |
| enum class AccountProviderTypes : std::uint8_t{ |
| Invalid, |
| RedfishService, |
| ActiveDirectoryService, |
| LDAPService, |
| OEM, |
| TACACSplus, |
| OAuth2, |
| }; |
| |
| enum class AuthenticationTypes : std::uint8_t{ |
| Invalid, |
| Token, |
| KerberosKeytab, |
| UsernameAndPassword, |
| OEM, |
| }; |
| |
| enum class TACACSplusPasswordExchangeProtocol : std::uint8_t{ |
| Invalid, |
| ASCII, |
| PAP, |
| CHAP, |
| MSCHAPv1, |
| MSCHAPv2, |
| }; |
| |
| enum class OAuth2Mode : std::uint8_t{ |
| Invalid, |
| Discovery, |
| Offline, |
| }; |
| |
| enum class CertificateMappingAttribute : std::uint8_t{ |
| Invalid, |
| Whole, |
| CommonName, |
| UserPrincipalName, |
| }; |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(MFABypassType, { |
| {MFABypassType::Invalid, "Invalid"}, |
| {MFABypassType::All, "All"}, |
| {MFABypassType::SecurID, "SecurID"}, |
| {MFABypassType::GoogleAuthenticator, "GoogleAuthenticator"}, |
| {MFABypassType::MicrosoftAuthenticator, "MicrosoftAuthenticator"}, |
| {MFABypassType::ClientCertificate, "ClientCertificate"}, |
| {MFABypassType::OEM, "OEM"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(LocalAccountAuth, { |
| {LocalAccountAuth::Invalid, "Invalid"}, |
| {LocalAccountAuth::Enabled, "Enabled"}, |
| {LocalAccountAuth::Disabled, "Disabled"}, |
| {LocalAccountAuth::Fallback, "Fallback"}, |
| {LocalAccountAuth::LocalFirst, "LocalFirst"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(AccountProviderTypes, { |
| {AccountProviderTypes::Invalid, "Invalid"}, |
| {AccountProviderTypes::RedfishService, "RedfishService"}, |
| {AccountProviderTypes::ActiveDirectoryService, "ActiveDirectoryService"}, |
| {AccountProviderTypes::LDAPService, "LDAPService"}, |
| {AccountProviderTypes::OEM, "OEM"}, |
| {AccountProviderTypes::TACACSplus, "TACACSplus"}, |
| {AccountProviderTypes::OAuth2, "OAuth2"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationTypes, { |
| {AuthenticationTypes::Invalid, "Invalid"}, |
| {AuthenticationTypes::Token, "Token"}, |
| {AuthenticationTypes::KerberosKeytab, "KerberosKeytab"}, |
| {AuthenticationTypes::UsernameAndPassword, "UsernameAndPassword"}, |
| {AuthenticationTypes::OEM, "OEM"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(TACACSplusPasswordExchangeProtocol, { |
| {TACACSplusPasswordExchangeProtocol::Invalid, "Invalid"}, |
| {TACACSplusPasswordExchangeProtocol::ASCII, "ASCII"}, |
| {TACACSplusPasswordExchangeProtocol::PAP, "PAP"}, |
| {TACACSplusPasswordExchangeProtocol::CHAP, "CHAP"}, |
| {TACACSplusPasswordExchangeProtocol::MSCHAPv1, "MSCHAPv1"}, |
| {TACACSplusPasswordExchangeProtocol::MSCHAPv2, "MSCHAPv2"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(OAuth2Mode, { |
| {OAuth2Mode::Invalid, "Invalid"}, |
| {OAuth2Mode::Discovery, "Discovery"}, |
| {OAuth2Mode::Offline, "Offline"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(CertificateMappingAttribute, { |
| {CertificateMappingAttribute::Invalid, "Invalid"}, |
| {CertificateMappingAttribute::Whole, "Whole"}, |
| {CertificateMappingAttribute::CommonName, "CommonName"}, |
| {CertificateMappingAttribute::UserPrincipalName, "UserPrincipalName"}, |
| }); |
| |
| } // namespace account_service |
| // clang-format on |