MySQL 9.3.0
Source Code Documentation
handler_authorize_auth_apps.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_AUTH_APPDS_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_HANDLER_AUTHENTICATION_AUTHORIZE_AUTH_APPDS_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:
43 HandlerAuthorizeAuthApps(const Protocol protocol, const std::string &url_host,
44 const UniversalId service_id,
45 const std::string &service_path,
46 const std::string &rest_path_matcher,
47 const std::string &options,
48 const std::string &redirection,
49 interface::AuthorizeManager *auth_manager);
50
52 bool may_check_access() const override;
53 UniversalId get_service_id() const override;
54 UniversalId get_db_object_id() const override;
55 UniversalId get_schema_id() const override;
56 const std::string &get_service_path() const override;
57 const std::string &get_schema_path() const override;
58 const std::string &get_db_object_path() const override;
59
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 redirection_;
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_AUTH_APPDS_H_
Definition: protocol.h:33
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4618
Definition: handler_authorize_auth_apps.h:41
UniversalId get_schema_id() const override
Definition: handler_authorize_auth_apps.cc:67
HttpResult handle_delete(RequestContext *ctxt) override
Definition: handler_authorize_auth_apps.cc:129
std::string copy_url_
Definition: handler_authorize_auth_apps.h:72
uint32_t get_access_rights() const override
Definition: handler_authorize_auth_apps.cc:91
UniversalId get_db_object_id() const override
Definition: handler_authorize_auth_apps.cc:72
const std::string redirection_
Definition: handler_authorize_auth_apps.h:71
HandlerAuthorizeAuthApps(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 &redirection, interface::AuthorizeManager *auth_manager)
Definition: handler_authorize_auth_apps.cc:47
const std::string & get_db_object_path() const override
Definition: handler_authorize_auth_apps.cc:86
const std::string & get_service_path() const override
Definition: handler_authorize_auth_apps.cc:77
UniversalId service_id_
Definition: handler_authorize_auth_apps.h:69
HttpResult handle_post(RequestContext *ctxt, const std::vector< uint8_t > &document) override
Definition: handler_authorize_auth_apps.cc:124
UniversalId get_service_id() const override
Definition: handler_authorize_auth_apps.cc:63
HttpResult handle_put(RequestContext *ctxt) override
Definition: handler_authorize_auth_apps.cc:133
const std::string service_path_
Definition: handler_authorize_auth_apps.h:70
const std::string & get_schema_path() const override
Definition: handler_authorize_auth_apps.cc:81
bool may_check_access() const override
Definition: handler_authorize_auth_apps.cc:137
HttpResult handle_get(RequestContext *ctxt) override
Definition: handler_authorize_auth_apps.cc:96
Authorization requires_authentication() const override
Definition: handler_authorize_auth_apps.cc:59
std::string copy_path_
Definition: handler_authorize_auth_apps.h:73
Definition: handler_authorize_base.h:35
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