Guest User

Untitled

a guest
Nov 25th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. $.ajax({
  2. url: "http://localhost:5984/_session",
  3. type: "POST",
  4. data: {
  5. username: "myUsername",
  6. password: "myPassword",
  7. },
  8. success: function (result) {
  9. console.log(result);
  10. },
  11. error: function (err) {
  12. console.log(err);
  13. },
  14. });
  15.  
  16. { name: "myUsername", ok: true, roles: [ "someRoles" ] }
  17.  
  18. $.ajax({
  19. url: "http://localhost:5984/_session",
  20. type: "GET",
  21. success: function (result) {
  22. console.log(result);
  23. },
  24. });
  25.  
  26. {
  27. info: { authentication_db: "_users", authentication_handlers: […] },
  28. ok: true,
  29. userCtx: { name: null, roles: [] }
  30. }
Add Comment
Please, Sign In to add comment