diff --git a/index.html b/index.html index 8cb3ba1..d11c053 100644 --- a/index.html +++ b/index.html @@ -217,7 +217,7 @@
address: 
subject: 
-
issuer: 
+
issuer: 
@@ -232,6 +232,19 @@
+
+ + +
+
+
+
+ Directives Discovery: +
+ (this is how we learn if a server support oauth3 and to what extent) +
+
+
OAUTH3.urls.discover("", opts);
@@ -299,16 +312,22 @@
-
+
+

1st Party and App Login



- Credential Exists URL + Credential Meta URL + (Not implemented... anymore)
(this is the endpoint that reports if the user exists and what their proof-strategy is)
- ... + + +
OAUTH3.authn.loginMeta(directives, { email: "" });
+
+
@@ -321,7 +340,19 @@ (this is the URL that sends your one-time password via email)
- ... + + +
OAUTH3.authn.otp(directives, { email: "" });
+
+
 
+
+
+
+

+
+
+
+
diff --git a/js/playground.js b/js/playground.js index 46ed82a..1fa5a87 100644 --- a/js/playground.js +++ b/js/playground.js @@ -41,14 +41,15 @@ ]; vm.form = {}; - vm.form.id = ''; + vm.form.id = 'coolaj86@gmail.com'; vm.form.subject = ''; vm.form.userProvider = ''; - vm.form.provider = ''; + vm.form.provider = 'sso.hellabit.com'; vm.form.scopes = ''; vm.locks = {}; vm.validated = {}; + vm.responses = {}; // // Convenience for our app @@ -176,10 +177,31 @@ vm.directives = null; }; + // A place for all the generated urls + vm.urls = {}; + // // Wrap around the OAUTH3 APIs // vm.api = {}; + vm.api.urls = {}; + vm.api.authn = {}; + vm.api.urls.credentialMeta = function () { + vm.urls.credentialMeta = OAUTH3.urls.credentialMeta(vm.directives, { email: vm.form.id }); + }; + vm.api.urls.otp = function () { + vm.urls.otp = OAUTH3.urls.otp(vm.directives, { email: vm.form.id }); + }; + vm.api.authn.otp = function () { + vm.api.urls.otp(); + OAUTH3.authn.otp(vm.directives, { email: vm.form.id }).then(function (resp) { + vm.responses.otp = resp; + }); + }; + vm.api.authn.credentialMeta = function () { + vm.api.urls.credentialMeta(); + OAUTH3.authn.loginMeta(vm.directives, { email: vm.form.id }); + }; vm.api.providerUri = function () { console.log('[DEBUG] providerUri:', vm.providerUri); try { @@ -203,7 +225,6 @@ } }; vm.api._discoverCount = 0; - vm.api.urls = {}; vm.api.urls.implicitGrant = function (provider) { if (!vm.directives) { console.log('[DEBUG] skipping implicit grant due to missing directives');