"use strict";var t=this&&this.__awaiter||function(t,i,n,e){return new(n||(n=Promise))((function(o,r){function u(t){try{s(e.next(t))}catch(t){r(t)}}function a(t){try{s(e.throw(t))}catch(t){r(t)}}function s(t){var i;t.done?o(t.value):(i=t.value,i instanceof n?i:new n((function(t){t(i)}))).then(u,a)}s((e=e.apply(t,i||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAuthorization=void 0;const i=require("../../registry"),n=require("../../../../util/StringUtils"),e=require("../impl/authorization/SshAuthorization"),o=require("../impl/authorization/TokenAuthorization");exports.getAuthorization=function(r){return t(this,void 0,void 0,(function*(){const t=yield(0,i.getAuth)(r,!0);return n.StringUtils.isBlank(t)?new e.SshAuthorization:new o.TokenAuthorization}))};