Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setup (settings, resp) {
const setNextResponse = Util.mockAjax();
const baseUrl = 'https://foo.com';
const authClient = new OktaAuth({ url: baseUrl });
const router = new Router(_.extend({
el: $sandbox,
baseUrl: baseUrl,
authClient: authClient,
useIdxPipeline: true
}, settings));
const beacon = new Beacon($sandbox);
const form = new FormView($sandbox);
Util.registerRouter(router);
Util.mockRouterNavigate(router);
Util.mockJqueryCss();
setNextResponse(resp);
return Util.mockIntrospectResponse(router, resp).then(function () {
return {
router: router,
function setup (settings) {
const setNextResponse = Util.mockAjax();
const baseUrl = 'https://foo.com';
const authClient = new OktaAuth({ url: baseUrl });
const router = new Router(_.extend({
el: $sandbox,
baseUrl: baseUrl,
authClient: authClient,
useIdxPipeline: true
}, settings));
const beacon = new Beacon($sandbox);
const form = new FormView($sandbox);
Util.registerRouter(router);
Util.mockRouterNavigate(router);
Util.mockJqueryCss();
return Q({
router: router,
beacon: beacon,
form: form,