diff --git a/include/caosdb/authentication.h b/include/caosdb/authentication.h index de3f9848141c504a936b51e43f5f9b919c2c869e..da004572cf96432fae3a57350b312f23f43b319c 100644 --- a/include/caosdb/authentication.h +++ b/include/caosdb/authentication.h @@ -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 { diff --git a/include/caosdb/connection.h b/include/caosdb/connection.h index c233dce61c550a8b6e20e029456dc00b73b754b7..1f8bc9459783c1a7ed8f63f2e64ffc060edbbe48 100644 --- a/include/caosdb/connection.h +++ b/include/caosdb/connection.h @@ -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; diff --git a/src/caosdb/authentication.cpp b/src/caosdb/authentication.cpp index 4ff218538671ee726d0869749b62e05bb99c16c7..e7849829a58ea34159f960e483011498db21a745 100644 --- a/src/caosdb/authentication.cpp +++ b/src/caosdb/authentication.cpp @@ -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; diff --git a/src/caosdb/connection.cpp b/src/caosdb/connection.cpp index f7fe59245d2c121d1013f008b768c9e69d1cb487..4a780750451d2fa72f3d88f31b7170bba2a09e1f 100644 --- a/src/caosdb/connection.cpp +++ b/src/caosdb/connection.cpp @@ -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;