1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace account_service 5 { 6 // clang-format off 7 8 enum class MFABypassType{ 9 Invalid, 10 All, 11 SecurID, 12 GoogleAuthenticator, 13 MicrosoftAuthenticator, 14 ClientCertificate, 15 OEM, 16 }; 17 18 enum class LocalAccountAuth{ 19 Invalid, 20 Enabled, 21 Disabled, 22 Fallback, 23 LocalFirst, 24 }; 25 26 enum class AccountProviderTypes{ 27 Invalid, 28 RedfishService, 29 ActiveDirectoryService, 30 LDAPService, 31 OEM, 32 TACACSplus, 33 OAuth2, 34 }; 35 36 enum class AuthenticationTypes{ 37 Invalid, 38 Token, 39 KerberosKeytab, 40 UsernameAndPassword, 41 OEM, 42 }; 43 44 enum class TACACSplusPasswordExchangeProtocol{ 45 Invalid, 46 ASCII, 47 PAP, 48 CHAP, 49 MSCHAPv1, 50 MSCHAPv2, 51 }; 52 53 enum class OAuth2Mode{ 54 Invalid, 55 Discovery, 56 Offline, 57 }; 58 59 enum class CertificateMappingAttribute{ 60 Invalid, 61 Whole, 62 CommonName, 63 UserPrincipalName, 64 }; 65 66 NLOHMANN_JSON_SERIALIZE_ENUM(MFABypassType, { 67 {MFABypassType::Invalid, "Invalid"}, 68 {MFABypassType::All, "All"}, 69 {MFABypassType::SecurID, "SecurID"}, 70 {MFABypassType::GoogleAuthenticator, "GoogleAuthenticator"}, 71 {MFABypassType::MicrosoftAuthenticator, "MicrosoftAuthenticator"}, 72 {MFABypassType::ClientCertificate, "ClientCertificate"}, 73 {MFABypassType::OEM, "OEM"}, 74 }); 75 76 NLOHMANN_JSON_SERIALIZE_ENUM(LocalAccountAuth, { 77 {LocalAccountAuth::Invalid, "Invalid"}, 78 {LocalAccountAuth::Enabled, "Enabled"}, 79 {LocalAccountAuth::Disabled, "Disabled"}, 80 {LocalAccountAuth::Fallback, "Fallback"}, 81 {LocalAccountAuth::LocalFirst, "LocalFirst"}, 82 }); 83 84 NLOHMANN_JSON_SERIALIZE_ENUM(AccountProviderTypes, { 85 {AccountProviderTypes::Invalid, "Invalid"}, 86 {AccountProviderTypes::RedfishService, "RedfishService"}, 87 {AccountProviderTypes::ActiveDirectoryService, "ActiveDirectoryService"}, 88 {AccountProviderTypes::LDAPService, "LDAPService"}, 89 {AccountProviderTypes::OEM, "OEM"}, 90 {AccountProviderTypes::TACACSplus, "TACACSplus"}, 91 {AccountProviderTypes::OAuth2, "OAuth2"}, 92 }); 93 94 NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationTypes, { 95 {AuthenticationTypes::Invalid, "Invalid"}, 96 {AuthenticationTypes::Token, "Token"}, 97 {AuthenticationTypes::KerberosKeytab, "KerberosKeytab"}, 98 {AuthenticationTypes::UsernameAndPassword, "UsernameAndPassword"}, 99 {AuthenticationTypes::OEM, "OEM"}, 100 }); 101 102 NLOHMANN_JSON_SERIALIZE_ENUM(TACACSplusPasswordExchangeProtocol, { 103 {TACACSplusPasswordExchangeProtocol::Invalid, "Invalid"}, 104 {TACACSplusPasswordExchangeProtocol::ASCII, "ASCII"}, 105 {TACACSplusPasswordExchangeProtocol::PAP, "PAP"}, 106 {TACACSplusPasswordExchangeProtocol::CHAP, "CHAP"}, 107 {TACACSplusPasswordExchangeProtocol::MSCHAPv1, "MSCHAPv1"}, 108 {TACACSplusPasswordExchangeProtocol::MSCHAPv2, "MSCHAPv2"}, 109 }); 110 111 NLOHMANN_JSON_SERIALIZE_ENUM(OAuth2Mode, { 112 {OAuth2Mode::Invalid, "Invalid"}, 113 {OAuth2Mode::Discovery, "Discovery"}, 114 {OAuth2Mode::Offline, "Offline"}, 115 }); 116 117 NLOHMANN_JSON_SERIALIZE_ENUM(CertificateMappingAttribute, { 118 {CertificateMappingAttribute::Invalid, "Invalid"}, 119 {CertificateMappingAttribute::Whole, "Whole"}, 120 {CertificateMappingAttribute::CommonName, "CommonName"}, 121 {CertificateMappingAttribute::UserPrincipalName, "UserPrincipalName"}, 122 }); 123 124 } 125 // clang-format on 126