]>
Commit | Line | Data |
---|---|---|
e6ae24e1 AC |
1 | /** @file\r |
2 | Definitinos of RedfishHostInterfaceDxe driver.\r | |
3 | \r | |
4 | (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r | |
5 | \r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
39de741e | 9 | \r |
e6ae24e1 AC |
10 | #ifndef REDFISH_CREDENTIAL_LIB_H_\r |
11 | #define REDFISH_CREDENTIAL_LIB_H_\r | |
12 | \r | |
13 | #include <Uefi.h>\r | |
14 | \r | |
15 | /**\r | |
16 | Notification of Exit Boot Service.\r | |
17 | \r | |
18 | @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL.\r | |
19 | **/\r | |
20 | VOID\r | |
21 | EFIAPI\r | |
22 | LibCredentialExitBootServicesNotify (\r | |
23 | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This\r | |
39de741e | 24 | );\r |
e6ae24e1 AC |
25 | \r |
26 | /**\r | |
27 | Notification of End of DXe.\r | |
28 | \r | |
29 | @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL.\r | |
30 | **/\r | |
31 | VOID\r | |
32 | EFIAPI\r | |
33 | LibCredentialEndOfDxeNotify (\r | |
34 | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This\r | |
39de741e | 35 | );\r |
e6ae24e1 AC |
36 | \r |
37 | /**\r | |
38 | Retrieve platform's Redfish authentication information.\r | |
39 | \r | |
40 | This functions returns the Redfish authentication method together with the user Id and\r | |
41 | password.\r | |
42 | - For AuthMethodNone, the UserId and Password could be used for HTTP header authentication\r | |
43 | as defined by RFC7235.\r | |
44 | - For AuthMethodRedfishSession, the UserId and Password could be used for Redfish\r | |
45 | session login as defined by Redfish API specification (DSP0266).\r | |
46 | \r | |
47 | Callers are responsible for and freeing the returned string storage.\r | |
48 | \r | |
49 | @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.\r | |
50 | @param[out] AuthMethod Type of Redfish authentication method.\r | |
51 | @param[out] UserId The pointer to store the returned UserId string.\r | |
52 | @param[out] Password The pointer to store the returned Password string.\r | |
53 | \r | |
54 | @retval EFI_SUCCESS Get the authentication information successfully.\r | |
55 | @retval EFI_ACCESS_DENIED SecureBoot is disabled after EndOfDxe.\r | |
56 | @retval EFI_INVALID_PARAMETER This or AuthMethod or UserId or Password is NULL.\r | |
57 | @retval EFI_OUT_OF_RESOURCES There are not enough memory resources.\r | |
58 | @retval EFI_UNSUPPORTED Unsupported authentication method is found.\r | |
59 | \r | |
60 | **/\r | |
61 | EFI_STATUS\r | |
62 | EFIAPI\r | |
63 | LibCredentialGetAuthInfo (\r | |
64 | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,\r | |
65 | OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,\r | |
66 | OUT CHAR8 **UserId,\r | |
67 | OUT CHAR8 **Password\r | |
39de741e | 68 | );\r |
e6ae24e1 AC |
69 | \r |
70 | /**\r | |
71 | Notify the Redfish service provide to stop provide configuration service to this platform.\r | |
72 | \r | |
73 | This function should be called when the platfrom is about to leave the safe environment.\r | |
74 | It will notify the Redfish service provider to abort all logined session, and prohibit\r | |
75 | further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this\r | |
76 | function is returned.\r | |
77 | \r | |
78 | @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.\r | |
79 | @param[in] ServiceStopType Reason of stopping Redfish service.\r | |
80 | \r | |
81 | @retval EFI_SUCCESS Service has been stoped successfully.\r | |
82 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
83 | @retval Others Some error happened.\r | |
84 | \r | |
85 | **/\r | |
86 | EFI_STATUS\r | |
87 | EFIAPI\r | |
88 | LibStopRedfishService (\r | |
39de741e MK |
89 | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,\r |
90 | IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType\r | |
91 | );\r | |
92 | \r | |
e6ae24e1 | 93 | #endif\r |