1*0ec8b83dSEd Tanous #pragma once 2*0ec8b83dSEd Tanous #include <nlohmann/json.hpp> 3*0ec8b83dSEd Tanous 4*0ec8b83dSEd Tanous namespace account_service 5*0ec8b83dSEd Tanous { 6*0ec8b83dSEd Tanous // clang-format off 7*0ec8b83dSEd Tanous 8*0ec8b83dSEd Tanous enum class LocalAccountAuth{ 9*0ec8b83dSEd Tanous Invalid, 10*0ec8b83dSEd Tanous Enabled, 11*0ec8b83dSEd Tanous Disabled, 12*0ec8b83dSEd Tanous Fallback, 13*0ec8b83dSEd Tanous LocalFirst, 14*0ec8b83dSEd Tanous }; 15*0ec8b83dSEd Tanous 16*0ec8b83dSEd Tanous enum class AccountProviderTypes{ 17*0ec8b83dSEd Tanous Invalid, 18*0ec8b83dSEd Tanous RedfishService, 19*0ec8b83dSEd Tanous ActiveDirectoryService, 20*0ec8b83dSEd Tanous LDAPService, 21*0ec8b83dSEd Tanous OEM, 22*0ec8b83dSEd Tanous TACACSplus, 23*0ec8b83dSEd Tanous OAuth2, 24*0ec8b83dSEd Tanous }; 25*0ec8b83dSEd Tanous 26*0ec8b83dSEd Tanous enum class AuthenticationTypes{ 27*0ec8b83dSEd Tanous Invalid, 28*0ec8b83dSEd Tanous Token, 29*0ec8b83dSEd Tanous KerberosKeytab, 30*0ec8b83dSEd Tanous UsernameAndPassword, 31*0ec8b83dSEd Tanous OEM, 32*0ec8b83dSEd Tanous }; 33*0ec8b83dSEd Tanous 34*0ec8b83dSEd Tanous enum class TACACSplusPasswordExchangeProtocol{ 35*0ec8b83dSEd Tanous Invalid, 36*0ec8b83dSEd Tanous ASCII, 37*0ec8b83dSEd Tanous PAP, 38*0ec8b83dSEd Tanous CHAP, 39*0ec8b83dSEd Tanous MSCHAPv1, 40*0ec8b83dSEd Tanous MSCHAPv2, 41*0ec8b83dSEd Tanous }; 42*0ec8b83dSEd Tanous 43*0ec8b83dSEd Tanous enum class OAuth2Mode{ 44*0ec8b83dSEd Tanous Invalid, 45*0ec8b83dSEd Tanous Discovery, 46*0ec8b83dSEd Tanous Offline, 47*0ec8b83dSEd Tanous }; 48*0ec8b83dSEd Tanous 49*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LocalAccountAuth, { 50*0ec8b83dSEd Tanous {LocalAccountAuth::Invalid, "Invalid"}, 51*0ec8b83dSEd Tanous {LocalAccountAuth::Enabled, "Enabled"}, 52*0ec8b83dSEd Tanous {LocalAccountAuth::Disabled, "Disabled"}, 53*0ec8b83dSEd Tanous {LocalAccountAuth::Fallback, "Fallback"}, 54*0ec8b83dSEd Tanous {LocalAccountAuth::LocalFirst, "LocalFirst"}, 55*0ec8b83dSEd Tanous }); 56*0ec8b83dSEd Tanous 57*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(AccountProviderTypes, { 58*0ec8b83dSEd Tanous {AccountProviderTypes::Invalid, "Invalid"}, 59*0ec8b83dSEd Tanous {AccountProviderTypes::RedfishService, "RedfishService"}, 60*0ec8b83dSEd Tanous {AccountProviderTypes::ActiveDirectoryService, "ActiveDirectoryService"}, 61*0ec8b83dSEd Tanous {AccountProviderTypes::LDAPService, "LDAPService"}, 62*0ec8b83dSEd Tanous {AccountProviderTypes::OEM, "OEM"}, 63*0ec8b83dSEd Tanous {AccountProviderTypes::TACACSplus, "TACACSplus"}, 64*0ec8b83dSEd Tanous {AccountProviderTypes::OAuth2, "OAuth2"}, 65*0ec8b83dSEd Tanous }); 66*0ec8b83dSEd Tanous 67*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationTypes, { 68*0ec8b83dSEd Tanous {AuthenticationTypes::Invalid, "Invalid"}, 69*0ec8b83dSEd Tanous {AuthenticationTypes::Token, "Token"}, 70*0ec8b83dSEd Tanous {AuthenticationTypes::KerberosKeytab, "KerberosKeytab"}, 71*0ec8b83dSEd Tanous {AuthenticationTypes::UsernameAndPassword, "UsernameAndPassword"}, 72*0ec8b83dSEd Tanous {AuthenticationTypes::OEM, "OEM"}, 73*0ec8b83dSEd Tanous }); 74*0ec8b83dSEd Tanous 75*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(TACACSplusPasswordExchangeProtocol, { 76*0ec8b83dSEd Tanous {TACACSplusPasswordExchangeProtocol::Invalid, "Invalid"}, 77*0ec8b83dSEd Tanous {TACACSplusPasswordExchangeProtocol::ASCII, "ASCII"}, 78*0ec8b83dSEd Tanous {TACACSplusPasswordExchangeProtocol::PAP, "PAP"}, 79*0ec8b83dSEd Tanous {TACACSplusPasswordExchangeProtocol::CHAP, "CHAP"}, 80*0ec8b83dSEd Tanous {TACACSplusPasswordExchangeProtocol::MSCHAPv1, "MSCHAPv1"}, 81*0ec8b83dSEd Tanous {TACACSplusPasswordExchangeProtocol::MSCHAPv2, "MSCHAPv2"}, 82*0ec8b83dSEd Tanous }); 83*0ec8b83dSEd Tanous 84*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(OAuth2Mode, { 85*0ec8b83dSEd Tanous {OAuth2Mode::Invalid, "Invalid"}, 86*0ec8b83dSEd Tanous {OAuth2Mode::Discovery, "Discovery"}, 87*0ec8b83dSEd Tanous {OAuth2Mode::Offline, "Offline"}, 88*0ec8b83dSEd Tanous }); 89*0ec8b83dSEd Tanous 90*0ec8b83dSEd Tanous } 91*0ec8b83dSEd Tanous // clang-format on 92