Skip to content
Snippets Groups Projects
Commit 1d0944e3 authored by florian's avatar florian
Browse files

DRAFT: Add broken PlainPasswordAuthenticator

parent 09632101
No related branches found
No related tags found
1 merge request!1DRAFT: ENH: Include libcaosdb and a minimal wrapper
Pipeline #10101 failed
......@@ -29,6 +29,15 @@
#include "caosdb/constants.h"
#include "caosdb/exceptions.h"
namespace jlcxx
{
template<>
struct SuperType<caosdb::authentication::PlainPasswordAuthenticator>
{
typedef caosdb::authentication::Authenticator type;
};
}
JLCXX_MODULE define_julia_module(jlcxx::Module& mod)
{
// Version info of libcaosdb against which this is built.
......@@ -37,10 +46,19 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod)
mod.method("get_libcaosdb_version_patch", []() {return caosdb::LIBCAOSDB_VERSION_PATCH;});
// exceptions inherit from abstract Julia exception types:
mod.add_type<caosdb::exceptions::AuthenticationError>("AuthenticationError", jlcxx::julia_type("AbstractAuthenticationError"))
mod.add_type<caosdb::exceptions::AuthenticationError>("AuthenticationError",
jlcxx::julia_type("AbstractAuthenticationError"))
.constructor<const std::string&>()
.method("what", &caosdb::exceptions::AuthenticationError::what);
mod.add_type<caosdb::exceptions::ConnectionError>("ConnectionError", jlcxx::julia_type("AbstractConnectionError"))
mod.add_type<caosdb::exceptions::ConnectionError>("ConnectionError",
jlcxx::julia_type("AbstractConnectionError"))
.constructor<const std::string&>()
.method("what", &caosdb::exceptions::ConnectionError::what);
// authenticators
mod.add_type<caosdb::authentication::Authenticator>("CaosDBAuthenticator");
mod.add_type<caosdb::authentication::PlainPasswordAuthenticator>("PlainPasswordAuthenticator",
jlcxx::julia_base_type<caosdb::authentication::Authenticator>())
.constructor<const std::string&, const std::string&>()
.method("getCallCredentials", &caosdb::authentication::PlainPasswordAuthenticator::getCallCredentials);
}
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