@kilterset/auth0-actions-testing
Version:
Test and develop Auth0 Actions or Okta CIC Actions locally.
40 lines • 1.81 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.request = void 0;
const chance_1 = require("./chance");
const connection_1 = require("./connection");
const define_1 = require("./define");
exports.request = (0, define_1.define)(() => {
const { name: connectionName } = (0, connection_1.connection)();
return {
ip: chance_1.chance.ipv6(),
asn: chance_1.chance.pickone([chance_1.chance.asn(), undefined]),
method: chance_1.chance.pickone(["GET", "POST"]),
query: {
protocol: chance_1.chance.auth0().protocol(),
connection: connectionName,
client_id: chance_1.chance.auth0().clientId(),
response_type: chance_1.chance.oAuth().responseType(),
prompt: chance_1.chance.pickone(["login", undefined]),
scope: chance_1.chance.oAuth().scopes().join(" "),
redirect_uri: chance_1.chance.url({ path: "redirect" }),
},
body: {},
geoip: {
cityName: chance_1.chance.city(),
continentCode: chance_1.chance.string({ length: 2, alpha: true }),
countryCode3: chance_1.chance.string({ length: 3, alpha: true }),
countryCode: chance_1.chance.country(),
countryName: chance_1.chance.country({ full: true }),
latitude: chance_1.chance.latitude(),
longitude: chance_1.chance.longitude(),
subdivisionCode: chance_1.chance.state(),
subdivisionName: chance_1.chance.state({ full: true }),
timeZone: chance_1.chance.tzIdentifier(),
},
hostname: chance_1.chance.auth0().domain(),
language: chance_1.chance.locale(),
user_agent: chance_1.chance.useragent(),
};
});
//# sourceMappingURL=request.js.map