diff --git a/build/bundle.js b/build/bundle.js deleted file mode 100644 index 274f71c..0000000 --- a/build/bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports=function(e){function n(o){if(t[o])return t[o].exports;var a=t[o]={exports:{},id:o,loaded:!1};return e[o].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}var t={};return n.m=e,n.c=t,n.p="/build/",n(0)}([function(e,n,t){"use strict";var o=t(1);e.exports=o.fromExpress(t(2));var a=t(9),s=t(2);e.exports=a.createServer(function(e,n){return s(e,n)})},function(e,n){e.exports=require("webtask-tools")},function(e,n,t){"use strict";var o=(t(3),t(4)),a=t(5),s=t(6),l=t(7),i=t(8),r=(t(1),t(9)),c=(t(9).middlewares,t(10),t(11),t(12),t(11).config()),d=t(13),u=t(15);t(16).ManagementClient;e.exports=function(e,n){var p=t(17),v=i.compile(t(19)),h=i.compile(t(20));c.setProvider(e);var g=s();g.use(l.json()),g.use(l.urlencoded({extended:!1})),g.use(t(21)),g.use(d(c("AUTH0_DOMAIN"),"Authentication API Debugger Extension",c("AUTH0_RTA"))),g.get("/pkce",function(e,n){var t=p.base64url(a.randomBytes(32));return n.json({verifier:t,verifier_challenge:p.base64url(a.createHash("sha256").update(t).digest())})}),g.get("/hash",function(e,n){n.send(h({hash:p.syntaxHighlight(e.query),id_token:p.jwt(e.query&&e.query.id_token),access_token:p.jwt(e.query&&e.query.access_token)}))}),g.post("/request",function(e,n){var t=e.body.request;delete e.body.request,n.send(h({request:p.syntaxHighlight(t),response:p.syntaxHighlight(e.body),id_token:p.jwt(e.body&&e.body.id_token),access_token:p.jwt(e.body&&e.body.access_token)}))}),g.get("/meta",o(),function(e,n){n.status(200).send(u)});var f=function(e,n){var t=e.headers;delete t["x-wt-params"],n.send(v({method:e.method,domain:e.webtaskContext.data.AUTH0_DOMAIN,baseUrl:r.urlHelpers.getBaseUrl(e).replace("http://","https://"),headers:p.syntaxHighlight(e.headers),body:p.syntaxHighlight(e.body),query:p.syntaxHighlight(e.query),authorization_code:e.query&&e.query.code,samlResponse:p.samlResponse(e.body&&e.body.SAMLResponse),wsFedResult:p.wsFedResult(e.body&&e.body.wresult),id_token:p.jwt(e.body&&e.body.id_token),access_token:p.jwt(e.body&&e.body.access_token)}))};return g.get("*",f),g.post("*",f),g}},function(e,n){e.exports=require("path")},function(e,n){e.exports=require("cors")},function(e,n){e.exports=require("crypto")},function(e,n){e.exports=require("express")},function(e,n){e.exports=require("body-parser")},function(e,n){e.exports=require("handlebars")},function(e,n){e.exports=require("auth0-extension-express-tools")},function(e,n){e.exports=require("auth0-oauth2-express@1.2.0")},function(e,n){e.exports=require("auth0-extension-tools")},function(e,n){e.exports=require("lodash")},function(e,n,t){"use strict";var o=t(14),a=t(10);e.exports=function(e,n,t){if(!e)throw new Error("Domain is required");if(!n)throw new Error("Title is required");var s={credentialsRequired:!1,scopes:"read:clients read:client_keys",clientName:n,audience:function(){return"https://"+e+"/api/v2/"},rootTenantAuthority:t},l=a(s);return function(e,n,t){var a="https",i=o.parse(e.originalUrl).pathname.replace(e.path,""),r=o.format({protocol:a,host:e.get("host"),pathname:i});return s.clientId=r,l(e,n,t)}}},function(e,n){e.exports=require("url")},function(e,n){e.exports={title:"Auth0 Authentication API Debugger",name:"auth0-authentication-api-debugger",version:"1.1.3",author:"auth0",useHashName:!1,description:"This extension allows you to test and debug the various Authentication API endpoints",type:"application",docsUrl:"https://auth0.com/docs/extensions/authentication-api-debugger",logoUrl:"https://cdn.auth0.com/extensions/auth0-authentication-api-debugger/assets/logo.svg",repository:"https://github.com/auth0-extensions/auth0-authentication-api-debugger-extension",keywords:["auth0","extension"],auth0:{scopes:"read:clients read:client_keys"}}},function(e,n){e.exports=require("auth0")},function(e,n,t){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=t(12),s=t(18),l=function(e){var n="",t=/(>)(<)(\/*)/g;e=e.toString().replace(t,"$1\r\n$2$3");var o=0,a=e.split("\r\n");for(var s in a){var l=a[s],i=0;l.match(/.+<\/\w[^>]*>$/)?i=0:l.match(/^<\/\w/)?0!==o&&(o-=1):i=l.match(/^<\w[^>]*[^\/]>.*$/)?1:0;for(var r="",c=0;c/g,">").replace(/ /g," ")},i=function(e){return"string"!=typeof e&&(e=JSON.stringify(e,void 0,2)),e=e.replace(/&/g,"&").replace(//g,">"),e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,function(e){var n="json-value";return/^"/.test(e)?n=/:$/.test(e)?"json-key":"json-string":/true|false/.test(e)&&(n="json-value"),''+e+""})};e.exports.wsFedResult=function(e){if(!e||!e.length)return null;try{return l(e)}catch(n){return e}},e.exports.samlResponse=function(e){if(!e||!e.length)return null;try{var n=new Buffer(e,"base64").toString();return l(n)}catch(n){return e}},e.exports.jwt=function(e){if(!e||0!==e.indexOf("ey"))return null;try{var n=s.decode(e,{complete:!0});return i(n)}catch(n){return e}},e.exports.base64url=function(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},e.exports.syntaxHighlight=function(e){try{var n=function(){var n=a.keys(e);if(!n.length)return{v:null};var t={};return n.sort().forEach(function(n){t[n]=e[n]}),{v:i(t)}}();if("object"===("undefined"==typeof n?"undefined":o(n)))return n.v}catch(n){return JSON.stringify(e,null,2)}}},function(e,n){e.exports=require("jsonwebtoken")},function(e,n){"use strict";e.exports='\n\n Auth0 - Protocol Debugger\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n

Authentication API Debugger

\n
\n
\n
\n
\n \t
\n \t\t\n \t
\n \t
\n
\n
\n
\n
Please note that this extension retrieves the Client ID and Client Secrets for your Applications using the Management API. This information is subsequently used to call Authentication API endpoints where applicable.
\n
\n
\n \n

Hit this button if you want to remove everything from local storage.

\n
\n
\n
\n
\n \t\t\n \t
\n \t
\n
\n

Enter your account settings and additional application settings here (these will be persisted in localstorage).

\n
\n
\n
\n \n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n \n

Make sure you configure this as the Callback Url on your application.

\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n
\n \n

This might translate to RelayState or wctx depending on the protocol.

\n
\n
\n
\n
\n \n

Specify the name of a connection to skip the login page (eg: google-oauth2).

\n
\n
\n
\n
\n
\n
Specification: OAuth2
\n
User Flows
\n \n \n \n

The exchanges will use the Client ID (and optionally Secret) from the Configuration tab.

\n
Machine to Machine
\n \n

This will use the Client ID and Secret from the Configuration tab.

\n
Resource Owner Password Credentials
\n
\n
\n
\n \n
\n
\n
\n \n
\n \n

Optional: Only store passwords for test accounts here.

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n
\n \n

This field is here for legacy purposes. It\'s not part of the spec.

\n
\n
\n
\n \n \n

The Resource Owner Endpoint is here for legacy purposes. It\'s not part of the spec.

\n
Delegation
\n

Not part of the spec - this is here for legacy purposes only.

\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n \n
Settings
\n

The following settings might behave differently if you\'re using OAuth2 as a Service (Preview)

\n
\n
\n \n
\n
\n \n \n
\n

The PKCE (Proof Key for Code Exchange by OAuth Public Clients) or Hybrid Flow is a better alternative to the implicit flow for Mobile Apps. In Auth0, make sure you set the application type to "Native".

\n
\n
\n
\n \n
\n \n

Only required when you need an access token.

\n
\n
\n
\n \n \n
\n
\n
\n
\n \n
\n \n

Set the response type to code and then press the OIDC / OAuth2 button to get an authorization code.

\n
\n
\n
\n \n
\n \n

If you\'re using PKCE, this is what will be used instead of the Client Secret.

\n
\n
\n
\n \n
\n \n

Set the response type to code, request the offline_access scope and then press the OIDC / OAuth2 button to get an authorization code.

\n
\n
\n
\n \n
\n \n

You can try a mix of code, id_token, token

\n
\n
\n
\n \n
\n \n

You can try something like fragment, query or form_post

\n
\n
\n
\n
\n \n

You can try something like openid name email read:appointments

\n
\n
\n
\n
\n \n

You can try something like consent or login

\n
\n
\n
\n
\n \n

Like the OAuth2 state parameter. Required for OIDC Implicit Flow.

\n
\n
\n
\n
\n
\n \n \n
Logout
\n \n \n
SSO
\n \n
\n
\n
\n
\n
\n
\n
\n \t\t
\n
\n
\n
\n
Details
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n {{#if body}}\n
\n
\n
\n
Body
\n
\n
\n
\n
{{{body}}}
\n
\n
\n {{/if}}\n {{#if id_token}}\n
\n
\n
\n
ID Token
\n
\n
\n
\n
{{{id_token}}}
\n
\n
\n {{/if}}\n {{#if access_token}}\n
\n
\n
\n
Access Token
\n
\n
\n
\n
{{{access_token}}}
\n
\n
\n {{/if}}\n
\n {{#if samlResponse}}\n
\n
\n
\n
SAML Response
\n
\n
\n
\n
\n                        {{{samlResponse}}}\n                      
\n
\n
\n {{/if}}\n {{#if wsFedResult}}\n
\n
\n
\n
WS-Federation Result
\n
\n
\n
\n
\n                        {{{wsFedResult}}}\n                      
\n
\n
\n {{/if}}\n {{#if query}}\n
\n
\n
\n
Query
\n
\n
\n
\n
{{{query}}}
\n
\n
\n {{/if}}\n
\n
\n
\n
Headers
\n
\n
\n
\n
{{{headers}}}
\n
\n
\n \t\t
\n \t\t
\n \t\t
\n \t
\n
\n
\n
\n
\n
\n
\n \n
\n\n\n\n\n\n\n\n\n'; -},function(e,n){"use strict";e.exports='\n{{#if request}}\n
\n
\n
\n
Request
\n
\n
\n
\n
{{{request}}}
\n
\n
\n{{/if}}\n{{#if response}}\n
\n
\n
\n
Response
\n
\n
\n
\n
{{{response}}}
\n
\n
\n{{/if}}\n{{#if hash}}\n
\n
\n
\n
Hash Fragment
\n
\n
\n
\n
{{{hash}}}
\n
\n
\n{{/if}}\n{{#if id_token}}\n
\n
\n
\n
ID Token
\n
\n
\n
\n
{{{id_token}}}
\n
\n
\n{{/if}}\n{{#if access_token}}\n
\n
\n
\n
Access Token
\n
\n
\n
\n
{{{access_token}}}
\n
\n
\n{{/if}}\n'},function(e,n,t){"use strict";var o=t(3),a=t(6),s=a.Router(),l=t(22);if("development"===(process.env.NODE_ENV||"development")){l.argv().env().file(o.join(__dirname,"./../config.json"));var i=t(5).randomBytes(32).toString("hex");s.use(function(e,n,t){e.webtaskContext={data:{EXTENSION_SECRET:i,AUTH0_DOMAIN:l.get("AUTH0_DOMAIN"),AUTH0_CLIENT_ID:l.get("AUTH0_CLIENT_ID"),AUTH0_CLIENT_SECRET:l.get("AUTH0_CLIENT_SECRET")}},t()})}e.exports=s},function(e,n){e.exports=require("nconf")}]);