kerberos.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef KERBEROS_H
  2. #define KERBEROS_H
  3. #include <node.h>
  4. #include <gssapi/gssapi.h>
  5. #include <gssapi/gssapi_generic.h>
  6. #include <gssapi/gssapi_krb5.h>
  7. #include "nan.h"
  8. #include <node_object_wrap.h>
  9. #include <v8.h>
  10. extern "C" {
  11. #include "kerberosgss.h"
  12. }
  13. using namespace v8;
  14. using namespace node;
  15. class Kerberos : public Nan::ObjectWrap {
  16. public:
  17. Kerberos();
  18. ~Kerberos() {};
  19. // Constructor used for creating new Kerberos objects from C++
  20. static Nan::Persistent<FunctionTemplate> constructor_template;
  21. // Initialize function for the object
  22. static void Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target);
  23. // Method available
  24. static NAN_METHOD(AuthGSSClientInit);
  25. static NAN_METHOD(AuthGSSClientStep);
  26. static NAN_METHOD(AuthGSSClientUnwrap);
  27. static NAN_METHOD(AuthGSSClientWrap);
  28. static NAN_METHOD(AuthGSSClientClean);
  29. static NAN_METHOD(AuthGSSServerInit);
  30. static NAN_METHOD(AuthGSSServerClean);
  31. static NAN_METHOD(AuthGSSServerStep);
  32. static NAN_METHOD(AuthUserKrb5Password);
  33. private:
  34. static NAN_METHOD(New);
  35. // Handles the uv calls
  36. static void Process(uv_work_t* work_req);
  37. // Called after work is done
  38. static void After(uv_work_t* work_req);
  39. };
  40. #endif