[FEATURE] blob: force send phone verification token via SMS

This commit is contained in:
Matthew Fettig
2014-08-13 17:13:54 -07:00
parent e6fec67ce9
commit edbbbec8f3

View File

@@ -916,14 +916,22 @@ BlobClient.get = function (options, fn) {
* request new token to be sent for 2FA
* @param {string} url
* @param {string} id
* @param {string} force_sms
*/
BlobClient.requestToken = function (url, id, fn) {
BlobClient.requestToken = function (url, id, force_sms, fn) {
var config = {
method : 'GET',
url : url + '/v1/blob/' + id + '/2FA/requestToken'
};
if (force_sms && force_sms instanceof Function) {
fn = force_sms;
} else if (force_sms) {
config.url += "?force_sms=true";
}
request.get(config.url)
.end(function(err, resp) {
if (err) {