xref: /openbmc/bmcweb/features/redfish/include/generated/enums/account_service.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace account_service
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
10a8d8f9d8SEd Tanous enum class MFABypassType{
11a8d8f9d8SEd Tanous     Invalid,
12a8d8f9d8SEd Tanous     All,
13a8d8f9d8SEd Tanous     SecurID,
14a8d8f9d8SEd Tanous     GoogleAuthenticator,
15a8d8f9d8SEd Tanous     MicrosoftAuthenticator,
16a8d8f9d8SEd Tanous     ClientCertificate,
17e9cc1bc9SEd Tanous     OneTimePasscode,
18dd5c81e9SGunnar Mills     TimeBasedOneTimePassword,
19a8d8f9d8SEd Tanous     OEM,
20a8d8f9d8SEd Tanous };
21a8d8f9d8SEd Tanous 
220ec8b83dSEd Tanous enum class LocalAccountAuth{
230ec8b83dSEd Tanous     Invalid,
240ec8b83dSEd Tanous     Enabled,
250ec8b83dSEd Tanous     Disabled,
260ec8b83dSEd Tanous     Fallback,
270ec8b83dSEd Tanous     LocalFirst,
280ec8b83dSEd Tanous };
290ec8b83dSEd Tanous 
300ec8b83dSEd Tanous enum class AccountProviderTypes{
310ec8b83dSEd Tanous     Invalid,
320ec8b83dSEd Tanous     RedfishService,
330ec8b83dSEd Tanous     ActiveDirectoryService,
340ec8b83dSEd Tanous     LDAPService,
350ec8b83dSEd Tanous     OEM,
360ec8b83dSEd Tanous     TACACSplus,
370ec8b83dSEd Tanous     OAuth2,
380ec8b83dSEd Tanous };
390ec8b83dSEd Tanous 
400ec8b83dSEd Tanous enum class AuthenticationTypes{
410ec8b83dSEd Tanous     Invalid,
420ec8b83dSEd Tanous     Token,
430ec8b83dSEd Tanous     KerberosKeytab,
440ec8b83dSEd Tanous     UsernameAndPassword,
450ec8b83dSEd Tanous     OEM,
460ec8b83dSEd Tanous };
470ec8b83dSEd Tanous 
480ec8b83dSEd Tanous enum class TACACSplusPasswordExchangeProtocol{
490ec8b83dSEd Tanous     Invalid,
500ec8b83dSEd Tanous     ASCII,
510ec8b83dSEd Tanous     PAP,
520ec8b83dSEd Tanous     CHAP,
530ec8b83dSEd Tanous     MSCHAPv1,
540ec8b83dSEd Tanous     MSCHAPv2,
550ec8b83dSEd Tanous };
560ec8b83dSEd Tanous 
570ec8b83dSEd Tanous enum class OAuth2Mode{
580ec8b83dSEd Tanous     Invalid,
590ec8b83dSEd Tanous     Discovery,
600ec8b83dSEd Tanous     Offline,
610ec8b83dSEd Tanous };
620ec8b83dSEd Tanous 
63a8d8f9d8SEd Tanous enum class CertificateMappingAttribute{
64a8d8f9d8SEd Tanous     Invalid,
65a8d8f9d8SEd Tanous     Whole,
66a8d8f9d8SEd Tanous     CommonName,
67a8d8f9d8SEd Tanous     UserPrincipalName,
68a8d8f9d8SEd Tanous };
69a8d8f9d8SEd Tanous 
702ae81db9SGunnar Mills enum class BasicAuthState{
712ae81db9SGunnar Mills     Invalid,
722ae81db9SGunnar Mills     Enabled,
732ae81db9SGunnar Mills     Unadvertised,
742ae81db9SGunnar Mills     Disabled,
752ae81db9SGunnar Mills };
762ae81db9SGunnar Mills 
77a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(MFABypassType, {
78a8d8f9d8SEd Tanous     {MFABypassType::Invalid, "Invalid"},
79a8d8f9d8SEd Tanous     {MFABypassType::All, "All"},
80a8d8f9d8SEd Tanous     {MFABypassType::SecurID, "SecurID"},
81a8d8f9d8SEd Tanous     {MFABypassType::GoogleAuthenticator, "GoogleAuthenticator"},
82a8d8f9d8SEd Tanous     {MFABypassType::MicrosoftAuthenticator, "MicrosoftAuthenticator"},
83a8d8f9d8SEd Tanous     {MFABypassType::ClientCertificate, "ClientCertificate"},
84e9cc1bc9SEd Tanous     {MFABypassType::OneTimePasscode, "OneTimePasscode"},
85dd5c81e9SGunnar Mills     {MFABypassType::TimeBasedOneTimePassword, "TimeBasedOneTimePassword"},
86a8d8f9d8SEd Tanous     {MFABypassType::OEM, "OEM"},
87a8d8f9d8SEd Tanous });
88a8d8f9d8SEd Tanous 
890ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LocalAccountAuth, {
900ec8b83dSEd Tanous     {LocalAccountAuth::Invalid, "Invalid"},
910ec8b83dSEd Tanous     {LocalAccountAuth::Enabled, "Enabled"},
920ec8b83dSEd Tanous     {LocalAccountAuth::Disabled, "Disabled"},
930ec8b83dSEd Tanous     {LocalAccountAuth::Fallback, "Fallback"},
940ec8b83dSEd Tanous     {LocalAccountAuth::LocalFirst, "LocalFirst"},
950ec8b83dSEd Tanous });
960ec8b83dSEd Tanous 
970ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(AccountProviderTypes, {
980ec8b83dSEd Tanous     {AccountProviderTypes::Invalid, "Invalid"},
990ec8b83dSEd Tanous     {AccountProviderTypes::RedfishService, "RedfishService"},
1000ec8b83dSEd Tanous     {AccountProviderTypes::ActiveDirectoryService, "ActiveDirectoryService"},
1010ec8b83dSEd Tanous     {AccountProviderTypes::LDAPService, "LDAPService"},
1020ec8b83dSEd Tanous     {AccountProviderTypes::OEM, "OEM"},
1030ec8b83dSEd Tanous     {AccountProviderTypes::TACACSplus, "TACACSplus"},
1040ec8b83dSEd Tanous     {AccountProviderTypes::OAuth2, "OAuth2"},
1050ec8b83dSEd Tanous });
1060ec8b83dSEd Tanous 
1070ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationTypes, {
1080ec8b83dSEd Tanous     {AuthenticationTypes::Invalid, "Invalid"},
1090ec8b83dSEd Tanous     {AuthenticationTypes::Token, "Token"},
1100ec8b83dSEd Tanous     {AuthenticationTypes::KerberosKeytab, "KerberosKeytab"},
1110ec8b83dSEd Tanous     {AuthenticationTypes::UsernameAndPassword, "UsernameAndPassword"},
1120ec8b83dSEd Tanous     {AuthenticationTypes::OEM, "OEM"},
1130ec8b83dSEd Tanous });
1140ec8b83dSEd Tanous 
1150ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(TACACSplusPasswordExchangeProtocol, {
1160ec8b83dSEd Tanous     {TACACSplusPasswordExchangeProtocol::Invalid, "Invalid"},
1170ec8b83dSEd Tanous     {TACACSplusPasswordExchangeProtocol::ASCII, "ASCII"},
1180ec8b83dSEd Tanous     {TACACSplusPasswordExchangeProtocol::PAP, "PAP"},
1190ec8b83dSEd Tanous     {TACACSplusPasswordExchangeProtocol::CHAP, "CHAP"},
1200ec8b83dSEd Tanous     {TACACSplusPasswordExchangeProtocol::MSCHAPv1, "MSCHAPv1"},
1210ec8b83dSEd Tanous     {TACACSplusPasswordExchangeProtocol::MSCHAPv2, "MSCHAPv2"},
1220ec8b83dSEd Tanous });
1230ec8b83dSEd Tanous 
1240ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(OAuth2Mode, {
1250ec8b83dSEd Tanous     {OAuth2Mode::Invalid, "Invalid"},
1260ec8b83dSEd Tanous     {OAuth2Mode::Discovery, "Discovery"},
1270ec8b83dSEd Tanous     {OAuth2Mode::Offline, "Offline"},
1280ec8b83dSEd Tanous });
1290ec8b83dSEd Tanous 
130a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(CertificateMappingAttribute, {
131a8d8f9d8SEd Tanous     {CertificateMappingAttribute::Invalid, "Invalid"},
132a8d8f9d8SEd Tanous     {CertificateMappingAttribute::Whole, "Whole"},
133a8d8f9d8SEd Tanous     {CertificateMappingAttribute::CommonName, "CommonName"},
134a8d8f9d8SEd Tanous     {CertificateMappingAttribute::UserPrincipalName, "UserPrincipalName"},
135a8d8f9d8SEd Tanous });
136a8d8f9d8SEd Tanous 
1372ae81db9SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(BasicAuthState, {
1382ae81db9SGunnar Mills     {BasicAuthState::Invalid, "Invalid"},
1392ae81db9SGunnar Mills     {BasicAuthState::Enabled, "Enabled"},
1402ae81db9SGunnar Mills     {BasicAuthState::Unadvertised, "Unadvertised"},
1412ae81db9SGunnar Mills     {BasicAuthState::Disabled, "Disabled"},
1422ae81db9SGunnar Mills });
1432ae81db9SGunnar Mills 
1440ec8b83dSEd Tanous }
1450ec8b83dSEd Tanous // clang-format on
146