getting the profile with images and so on
This commit is contained in:
parent
c66ec0f8e9
commit
4c17a7d019
4 changed files with 58 additions and 30 deletions
|
|
@ -20,7 +20,7 @@ function getUrlVars(url) {
|
|||
}
|
||||
|
||||
function OauthImplementation(entity) {
|
||||
this.entity = entity || "http://lala.home.jeena.net:3002";
|
||||
this.entity = entity || "http://jeena.net";
|
||||
controller.setString_forKey_(this.entity, "entity");
|
||||
this.app_info = {
|
||||
"id": null,
|
||||
|
|
@ -51,7 +51,7 @@ OauthImplementation.prototype.requestProfileURL = function (entity) {
|
|||
getURL(entity, "HEAD", function(resp) {
|
||||
var headers = resp.getAllResponseHeaders();
|
||||
var regex = /Link: <([^>]*)>; rel="https:\/\/tent.io\/rels\/profile"/; // FIXME: parse it!
|
||||
var profile_url = headers.match(regex)[1]
|
||||
var profile_url = headers.match(regex)[1];
|
||||
if (profile_url == "/profile") {
|
||||
profile_url = entity + "/profile";
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue