Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lboyette-okta committed Jan 12, 2018
1 parent 9ec3fca commit a3f0bd6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions lib/clientBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,21 @@ proto.features.isTokenVerifySupported = function() {
// { username, password, (relayState), (context) }
proto.signIn = function (opts) {
var sdk = this;
var body = opts || {};
return new Q(!body.sendFingerprint ? {} :
sdk.fingerprint()
.then(function(fingerprint) {
return {
headers: {
'X-Device-Fingerprint': fingerprint
}
};
})
)
.then(function(options) {
body = util.clone(body);
delete body.sendFingerprint;
return tx.postToTransaction(sdk, '/api/v1/authn', body, options);
opts = util.clone(opts || {});
function postToTransaction(options) {
delete opts.sendFingerprint;
return tx.postToTransaction(sdk, '/api/v1/authn', opts, options);
}
if (!opts.sendFingerprint) {
return postToTransaction();
}
return sdk.fingerprint()
.then(function(fingerprint) {
return postToTransaction({
headers: {
'X-Device-Fingerprint': fingerprint
}
});
});
};

Expand Down

0 comments on commit a3f0bd6

Please sign in to comment.