@sddxzxqy/core-js-sdk
Version:
Official SDK of OCP Auth
2 lines (1 loc) • 667 B
JavaScript
import{__awaiter as t,__generator as n,__assign as o}from"tslib";var e=function(){function e(t){this.httpClient=t}return e.prototype.getFlowHandle=function(){return this.flowHandleStorage},e.prototype.updateFlowHandle=function(t){this.flowHandleStorage=t},e.prototype.authFlowX=function(e,i,r){return void 0===r&&(r={encrypt:!1}),t(this,void 0,void 0,(function(){var t,a;return n(this,(function(n){switch(n.label){case 0:return"/interaction/auth-flow",t=this.getFlowHandle(),a=o(o({action:e},i),{flowHandle:t}),[4,this.httpClient.postJson("/interaction/auth-flow",a,{encrypt:r.encrypt})];case 1:return[2,n.sent()]}}))}))},e}();export{e as AuthenticationFlowHandler};