1 #ifndef DALI_WEB_ENGINE_HTTP_AUTH_HANDLER_H
2 #define DALI_WEB_ENGINE_HTTP_AUTH_HANDLER_H
5 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
27 * @brief A class WebEngineHttpAuthHandler for HTTP authentication handler of web engine.
29 class WebEngineHttpAuthHandler
35 WebEngineHttpAuthHandler() = default;
40 virtual ~WebEngineHttpAuthHandler() = default;
43 * @brief Gets the realm string of authentication challenge received.
45 * @return the realm of authentication challenge
47 virtual std::string GetRealm() const = 0;
50 * @brief Suspend the operation for authentication challenge.
52 virtual void Suspend() = 0;
55 * @brief Send credential for authentication challenge.
57 * @param[in] user user id from user input.
58 * @param[in] password user password from user input.
60 virtual void UseCredential(const std::string& user, const std::string& password) = 0;
63 * @brief Send cancellation notification for authentication challenge.
65 virtual void CancelCredential() = 0;
70 #endif // DALI_WEB_ENGINE_HTTP_AUTH_HANDLER_H