MySQL 9.3.0
Source Code Documentation
handler_authorize_completed.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 2025, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_HANDLER_AUTHENTICATION_AUTHORIZE_COMPLETED_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_HANDLER_AUTHENTICATION_AUTHORIZE_COMPLETED_H_
28
29#include <optional>
30#include <string>
31#include <vector>
32
33#include "helper/media_type.h"
36
37namespace mrs {
38namespace endpoint {
39namespace handler {
40
42 public:
44 const std::string &url_host,
45 const UniversalId service_id,
46 const std::string &service_path,
47 const std::string &rest_path_matcher,
48 const std::string &options,
49 const std::string &page_content_custom,
50 interface::AuthorizeManager *auth_manager);
51
53 bool may_check_access() const override;
54 UniversalId get_service_id() const override;
55 UniversalId get_db_object_id() const override;
56 UniversalId get_schema_id() const override;
57 const std::string &get_service_path() const override;
58 const std::string &get_schema_path() const override;
59 const std::string &get_db_object_path() const override;
60 uint32_t get_access_rights() const override;
61
62 HttpResult handle_get(RequestContext *ctxt) override;
64 const std::vector<uint8_t> &document) override;
66 HttpResult handle_put(RequestContext *ctxt) override;
67
68 private:
70 const std::string service_path_;
71 const std::string page_content_custom_;
72 std::string copy_url_;
73 std::string copy_path_;
74};
75
76} // namespace handler
77} // namespace endpoint
78} // namespace mrs
79
80#endif // ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_HANDLER_AUTHENTICATION_AUTHORIZE_COMPLETED_H_
Definition: protocol.h:33
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4618
Definition: handler_authorize_base.h:35
Definition: handler_authorize_completed.h:41
const std::string & get_db_object_path() const override
Definition: handler_authorize_completed.cc:172
Authorization requires_authentication() const override
Definition: handler_authorize_completed.cc:151
UniversalId get_schema_id() const override
Definition: handler_authorize_completed.cc:159
UniversalId get_db_object_id() const override
Definition: handler_authorize_completed.cc:161
std::string copy_path_
Definition: handler_authorize_completed.h:73
HttpResult handle_delete(RequestContext *ctxt) override
Definition: handler_authorize_completed.cc:194
uint32_t get_access_rights() const override
Definition: handler_authorize_completed.cc:177
UniversalId service_id_
Definition: handler_authorize_completed.h:69
const std::string & get_service_path() const override
Definition: handler_authorize_completed.cc:163
UniversalId get_service_id() const override
Definition: handler_authorize_completed.cc:155
const std::string page_content_custom_
Definition: handler_authorize_completed.h:71
HttpResult handle_post(RequestContext *ctxt, const std::vector< uint8_t > &document) override
Definition: handler_authorize_completed.cc:189
bool may_check_access() const override
Definition: handler_authorize_completed.cc:202
HandlerAuthorizeCompleted(const Protocol protocol, const std::string &url_host, const UniversalId service_id, const std::string &service_path, const std::string &rest_path_matcher, const std::string &options, const std::string &page_content_custom, interface::AuthorizeManager *auth_manager)
Definition: handler_authorize_completed.cc:138
HttpResult handle_put(RequestContext *ctxt) override
Definition: handler_authorize_completed.cc:198
const std::string service_path_
Definition: handler_authorize_completed.h:70
HttpResult handle_get(RequestContext *ctxt) override
Definition: handler_authorize_completed.cc:182
std::string copy_url_
Definition: handler_authorize_completed.h:72
const std::string & get_schema_path() const override
Definition: handler_authorize_completed.cc:167
Definition: authorize_manager.h:58
Authorization
Definition: rest_handler.h:142
ContentFileEndpoint::UniversalId UniversalId
Definition: content_file_endpoint.cc:39
Definition: authorize_manager.h:48
Definition: options.cc:57
Definition: http_result.h:37
Definition: request_context.h:47