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