Skip to content
Snippets Groups Projects
Verified Commit b4807aad authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'f-authentication' into f-conan

parents c456bbbf 2a15f103
No related branches found
No related tags found
No related merge requests found
Pipeline #9521 failed
......@@ -28,14 +28,16 @@
* @brief Configuration and setup of the client authentication.
*/
#include <grpcpp/security/credentials.h> // for MetadataCredentialsPlugin
#include <map> // for multimap
#include <memory> // for shared_ptr
#include <string> // for string
#include "caosdb/utils.h" // for base64_encode
#include "grpcpp/impl/codegen/status.h" // for Status
#include "grpcpp/impl/codegen/string_ref.h" // for string_ref
namespace grpc { class AuthContext; }
#include <grpcpp/security/credentials.h> // for MetadataCredentialsPlugin
#include <map> // for multimap
#include <memory> // for shared_ptr
#include <string> // for string
#include "caosdb/utils.h" // for base64_encode
#include "grpcpp/impl/codegen/status.h" // for Status
#include "grpcpp/impl/codegen/string_ref.h" // for string_ref
namespace grpc {
class AuthContext;
}
namespace caosdb {
namespace authentication {
......@@ -67,10 +69,10 @@ private:
public:
MetadataCredentialsPluginImpl(std::string key, std::string value);
auto
GetMetadata(string_ref service_url, string_ref method_name,
const AuthContext &channel_auth_context,
std::multimap<grpc::string, grpc::string> *metadata) -> Status override;
auto GetMetadata(string_ref service_url, string_ref method_name,
const AuthContext &channel_auth_context,
std::multimap<grpc::string, grpc::string> *metadata)
-> Status override;
};
class PlainPasswordAuthenticator : public Authenticator {
......
......@@ -27,13 +27,25 @@
* @date 2021-05-18
* @brief Configuration and setup of the connection.
*/
#include <iosfwd> // for ostream
#include <memory> // for shared_ptr, unique_ptr
#include <string> // for string
#include "caosdb/info/v1alpha1/main.grpc.pb.h" // for GeneralInfoService
namespace caosdb { namespace authentication { class Authenticator; } }
namespace caosdb { namespace info { namespace v1alpha1 { class VersionInfo; } } }
namespace grpc { class ChannelCredentials; }
#include <iosfwd> // for ostream
#include <memory> // for shared_ptr, unique_ptr
#include <string> // for string
#include "caosdb/info/v1alpha1/main.grpc.pb.h" // for GeneralInfoService
namespace caosdb {
namespace authentication {
class Authenticator;
}
} // namespace caosdb
namespace caosdb {
namespace info {
namespace v1alpha1 {
class VersionInfo;
}
} // namespace info
} // namespace caosdb
namespace grpc {
class ChannelCredentials;
}
namespace caosdb::connection {
using caosdb::authentication::Authenticator;
......
......@@ -19,13 +19,13 @@
*
*/
#include "caosdb/authentication.h"
#include <grpcpp/impl/codegen/status.h> // for Status, Status::OK
#include <grpcpp/impl/codegen/string_ref.h> // for string_ref
#include <map> // for multimap
#include <memory> // for allocator, shared_ptr
#include <string> // for basic_string, operator+
#include <utility> // for pair, move, make_pair
#include "grpcpp/security/credentials.h" // for MetadataCredentialsFromP...
#include <grpcpp/impl/codegen/status.h> // for Status, Status::OK
#include <grpcpp/impl/codegen/string_ref.h> // for string_ref
#include <map> // for multimap
#include <memory> // for allocator, shared_ptr
#include <string> // for basic_string, operator+
#include <utility> // for pair, move, make_pair
#include "grpcpp/security/credentials.h" // for MetadataCredentialsFromP...
namespace caosdb::authentication {
using caosdb::utils::base64_encode;
......
......@@ -20,20 +20,22 @@
*
*/
#include "caosdb/connection.h"
#include <grpcpp/create_channel.h> // for CreateChannel
#include <grpcpp/impl/codegen/client_context.h> // for ClientContext
#include <grpcpp/impl/codegen/status.h> // for Status
#include <grpcpp/security/credentials.h> // for SslCredentials
#include <iostream> // for operator<<, basic_...
#include <stdexcept> // for runtime_error
#include <string> // for operator+, char_tr...
#include "caosdb/authentication.h" // for Authenticator
#include "caosdb/exceptions.h" // for AuthenticationError
#include "caosdb/info/v1alpha1/main.grpc.pb.h" // for GeneralInfoService
#include "caosdb/info/v1alpha1/main.pb.h" // for GetVersionInfoResp...
#include "caosdb/utils.h" // for load_string_file
#include "grpcpp/impl/codegen/status_code_enum.h" // for StatusCode, UNAUTH...
namespace grpc { class Channel; }
#include <grpcpp/create_channel.h> // for CreateChannel
#include <grpcpp/impl/codegen/client_context.h> // for ClientContext
#include <grpcpp/impl/codegen/status.h> // for Status
#include <grpcpp/security/credentials.h> // for SslCredentials
#include <iostream> // for operator<<, basic_...
#include <stdexcept> // for runtime_error
#include <string> // for operator+, char_tr...
#include "caosdb/authentication.h" // for Authenticator
#include "caosdb/exceptions.h" // for AuthenticationError
#include "caosdb/info/v1alpha1/main.grpc.pb.h" // for GeneralInfoService
#include "caosdb/info/v1alpha1/main.pb.h" // for GetVersionInfoResp...
#include "caosdb/utils.h" // for load_string_file
#include "grpcpp/impl/codegen/status_code_enum.h" // for StatusCode, UNAUTH...
namespace grpc {
class Channel;
}
namespace caosdb::connection {
using caosdb::authentication::Authenticator;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment