xref: /openbmc/bmcweb/features/redfish/include/generated/enums/external_account_provider.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 #include <nlohmann/json.hpp>
5 
6 namespace external_account_provider
7 {
8 // clang-format off
9 
10 enum class AccountProviderTypes{
11     Invalid,
12     RedfishService,
13     ActiveDirectoryService,
14     LDAPService,
15     OEM,
16     TACACSplus,
17     OAuth2,
18 };
19 
20 enum class AuthenticationTypes{
21     Invalid,
22     Token,
23     KerberosKeytab,
24     UsernameAndPassword,
25     OEM,
26 };
27 
28 enum class TACACSplusPasswordExchangeProtocol{
29     Invalid,
30     ASCII,
31     PAP,
32     CHAP,
33     MSCHAPv1,
34     MSCHAPv2,
35 };
36 
37 enum class OAuth2Mode{
38     Invalid,
39     Discovery,
40     Offline,
41 };
42 
43 NLOHMANN_JSON_SERIALIZE_ENUM(AccountProviderTypes, {
44     {AccountProviderTypes::Invalid, "Invalid"},
45     {AccountProviderTypes::RedfishService, "RedfishService"},
46     {AccountProviderTypes::ActiveDirectoryService, "ActiveDirectoryService"},
47     {AccountProviderTypes::LDAPService, "LDAPService"},
48     {AccountProviderTypes::OEM, "OEM"},
49     {AccountProviderTypes::TACACSplus, "TACACSplus"},
50     {AccountProviderTypes::OAuth2, "OAuth2"},
51 });
52 
53 NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationTypes, {
54     {AuthenticationTypes::Invalid, "Invalid"},
55     {AuthenticationTypes::Token, "Token"},
56     {AuthenticationTypes::KerberosKeytab, "KerberosKeytab"},
57     {AuthenticationTypes::UsernameAndPassword, "UsernameAndPassword"},
58     {AuthenticationTypes::OEM, "OEM"},
59 });
60 
61 NLOHMANN_JSON_SERIALIZE_ENUM(TACACSplusPasswordExchangeProtocol, {
62     {TACACSplusPasswordExchangeProtocol::Invalid, "Invalid"},
63     {TACACSplusPasswordExchangeProtocol::ASCII, "ASCII"},
64     {TACACSplusPasswordExchangeProtocol::PAP, "PAP"},
65     {TACACSplusPasswordExchangeProtocol::CHAP, "CHAP"},
66     {TACACSplusPasswordExchangeProtocol::MSCHAPv1, "MSCHAPv1"},
67     {TACACSplusPasswordExchangeProtocol::MSCHAPv2, "MSCHAPv2"},
68 });
69 
70 NLOHMANN_JSON_SERIALIZE_ENUM(OAuth2Mode, {
71     {OAuth2Mode::Invalid, "Invalid"},
72     {OAuth2Mode::Discovery, "Discovery"},
73     {OAuth2Mode::Offline, "Offline"},
74 });
75 
76 }
77 // clang-format on
78