[java-idp-plugin-webauthn] branch main updated: Add visual clue the authentication should have began

Phil Smart philip.smart at jisc.ac.uk
Mon Jan 22 17:17:29 UTC 2024


This is an automated email from the git hooks/post-receive script.

philsmart pushed a commit to branch main
in repository java-idp-plugin-webauthn.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-webauthn.git;a=commit;h=90bf2161e8affdbf3c034cb7324bf116523c8e36

The following commit(s) were added to refs/heads/main by this push:
     new 90bf216  Add visual clue the authentication should have began
90bf216 is described below

commit 90bf2161e8affdbf3c034cb7324bf116523c8e36
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Mon Jan 22 17:17:27 2024 +0000

    Add visual clue the authentication should have began
    
     - Very simple for now
---
 .../idp/plugin/authn/webauthn/views/webauthn-authn.vm     | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn.vm
index 77e2c5c..9544730 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn.vm
@@ -41,6 +41,13 @@
         } from "$request.getContextPath()/js/webauthn/webauthn-json.browser-ponyfill.js";
 
         async function authenticate() {
+            // Some UI changes
+            try {               
+                document.getElementById('authnProgress').classList.remove('hidden')
+            } catch (e) {
+                // No issue if this does not work
+            }
+        
             var pkCredRequestOptions = $webauthnContext.publicKeyCredentialRequestOptionsJSON;
             var parsedRequestOptions = parseRequestOptionsFromJSON({ publicKey: pkCredRequestOptions });
             #if($debug == "true")
@@ -51,7 +58,10 @@
                 .then(function (assertion) {
                     document.getElementById("publicKeyAssertion").value = JSON.stringify(assertion);
                     document.getElementById("authenticationSubmit").click();
-                }).catch(function (err) { console.error(err) });
+                }).catch(function (err) { 
+                    console.error(err);
+                    document.getElementById('authnProgress').classList.add('hidden')                
+                });
 
         }
 
@@ -132,6 +142,9 @@
                                 name="_eventId_proceed">#springMessageText("idp.webauthn.authn.submit", "Submit
                                 Authentication")</button>
                         </form>
+                        <div id="authnProgress" class="hidden centre">
+                            #springMessageText("idp.webauthn.authn.progress.message","Authenticating...")
+                        </div>
                         #if($debug == "true")
                         <div class="centre">
                             <button id="authenticate"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list