Skip to content

Commit 0404637

Browse files
author
nicola
committed
now returning a certificate - invalid so far
1 parent 5ebacc3 commit 0404637

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎lib/identity-provider.js‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ IdentityProvider.prototype.agent = function (options) {
4343
var url = options.url || this.buildURI(options.username, options.host)
4444
var card = url + this.pathCard
4545
var agent = card + this.suffixURI
46-
console.log(url, agent)
4746
return agent
4847
}
4948

@@ -381,9 +380,10 @@ IdentityProvider.prototype.getGraph = function (uri, callback) {
381380
data += chunk
382381
})
383382
.on('end', function () {
384-
parse(data, null, 'text/turtle', function (err, card) {
383+
// TODO make sure that uri is correct
384+
parse(data, uri, 'text/turtle', function (err, card) {
385385
if (err) {
386-
debug('WebId can\'t be parsed')
386+
debug('WebId can\'t be parsed: ' + err.message)
387387
var invalid = new Error('You have an invalid WebID card')
388388
invalid.status = 500
389389
return callback(invalid)
@@ -437,7 +437,6 @@ IdentityProvider.prototype.post = function (req, res, next) {
437437

438438
debug(options.username + ': account created, now setting the cookies and response')
439439
// Set the cookies on success
440-
console.log(agent)
441440
req.session.userId = agent;
442441
req.session.identified = true;
443442
res.set('User', agent)

0 commit comments

Comments
 (0)