cimpress-fulfiller-identity
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "cimpress-fulfiller-identity", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Thin client library for Cimpress' Fulfiller Identity service", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"scripts": { | ||
@@ -7,0 +7,0 @@ "test": "grunt test" |
@@ -19,5 +19,7 @@ const FulfillerIdentityProxy = require("./fulfiller_identity_proxy"); | ||
constructor(authorization, options) { | ||
if (typeof authorization == "string") { | ||
if (typeof authorization === "undefined") { | ||
this.authorizer = { getAuthorization: () => Promise.resolve("") }; | ||
} else if (typeof authorization === "string") { | ||
this.authorizer = { getAuthorization: () => Promise.resolve(authorization) }; | ||
} else if (typeof authorization == "function") { | ||
} else if (typeof authorization === "function") { | ||
this.authorizer = { getAuthorization: () => Promise.resolve(authorization()) }; | ||
@@ -32,3 +34,3 @@ } else { | ||
getUrl() { | ||
return fulfillerIdentityProxy.url; | ||
return this.fulfillerIdentityProxy.url; | ||
} | ||
@@ -35,0 +37,0 @@ |
20730
252