External Login Caravel

17 views
Skip to first unread message

Aram Lauxtermann

unread,
May 31, 2016, 3:06:15 PM5/31/16
to airbnb_caravel
Hi,

I am trying to login to caravel externally. I intercepted the post method and was wondering which: headers and body flask needs. Plus do I need to look for CORS type things?
P.S. The exact file locations would already help a lot.

Best & Tnx

Maxime Beauchemin

unread,
May 31, 2016, 3:34:41 PM5/31/16
to airbnb_caravel
I'm not sure if I get what you mean by "login externally", but here's how we login in the context of the unit tests:

Aram Lauxtermann

unread,
Jun 1, 2016, 2:56:18 AM6/1/16
to airbnb_caravel
I made a table in caravel that I want to show in a other web application on a other cloud instance. So I tried to post my Caravel credentials to caravel /login, but I get a Allow Origin (CORS) problem. So I temp. disabled CORS, but I am till being re-directed to the login page. Even when I follow redirects. So my question is basically, what do I need to post for a external login?

Tnx
Message has been deleted

Aram Lauxtermann

unread,
Jun 1, 2016, 9:09:51 AM6/1/16
to airbnb_caravel
Basically I post
var settings = {
"async": true,
"crossDomain": true,
"url": "http://XXXX.com/login/",
"method": "POST",
"headers": {
"origin": "http://XXX.com",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36",
"content-type": "application/x-www-form-urlencoded",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"referer": "http://analytics-prodocker.eu-central-1.elasticbeanstalk.com/login/",
"accept-encoding": "gzip, deflate",
"accept-language": "en-US,en;q=0.8,nl;q=0.6",
"cache-control": "no-cache"
},
"data": {
"username": "XXX",
"password": "XXX"

}
};

$.ajax(settings).done(function (response) {
console.log(response);
});





Reply all
Reply to author
Forward
0 new messages