[java-idp-plugin-webauthn] branch main updated: Improve views

Phil Smart philip.smart at jisc.ac.uk
Tue May 28 15:59:38 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=a558cd8c161ab77c0dd81a7708e9aedfc75cd02d

The following commit(s) were added to refs/heads/main by this push:
     new a558cd8  Improve views
a558cd8 is described below

commit a558cd8c161ab77c0dd81a7708e9aedfc75cd02d
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Tue May 28 16:59:35 2024 +0100

    Improve views
---
 .../LookupRegisteredCredentialsFromUserHandle.java    |  3 +--
 .../idp/plugin/authn/webauthn/messages.properties     | 19 ++++++++++++-------
 .../authn/webauthn/views/webauthn-authn-username.vm   |  4 ++--
 .../idp/plugin/authn/webauthn/views/webauthn-authn.vm |  4 ++--
 .../idp/plugin/authn/webauthn/views/webauthn-end.vm   |  2 +-
 .../webauthn/views/webauthn-management-search.vm      |  2 +-
 .../authn/webauthn/views/webauthn-management.vm       |  2 +-
 .../webauthn/views/webauthn-register-username.vm      |  2 +-
 .../plugin/authn/webauthn/views/webauthn-register.vm  |  4 ++--
 9 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java
index 57cee36..e61ab4f 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/impl/LookupRegisteredCredentialsFromUserHandle.java
@@ -136,8 +136,7 @@ public class LookupRegisteredCredentialsFromUserHandle extends AbstractWebAuthnA
         final Optional<ByteArray> userHandle = assertion.getResponse().getUserHandle();
         boolean credentialsFound = false;
         if (userHandle.isEmpty()) {
-            log.debug("{} User could not be found, the authenticator did not supply a userHandle, "
-                    + "no registered credentials", getLogPrefix());
+            log.debug("{} User could not be found, the authenticator did not supply a userHandle", getLogPrefix());
         } else {
             final Optional<String> potentialUsername = repository.getUsernameForUserHandle(userHandle.get());
             if (potentialUsername.isEmpty()) {
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/messages.properties b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/messages.properties
index 52e4efe..cc9fd41 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/messages.properties
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/messages.properties
@@ -10,7 +10,7 @@
 
 idp.webauthn.authn.authenticate.inprogress = Authenticating...
 idp.webauthn.authn.authenticate.retry = Login failed, retry
-idp.webauthn.authn.authenticate.submit = Submit Authentication
+idp.webauthn.authn.authenticate.submit = Submit authentication
 idp.webauthn.authn.authenticate = Login with passkey or security key
 
 idp.webauthn.authn.unsupported = Your browser is not WebAuthn compatible
@@ -18,8 +18,10 @@ idp.webauthn.authn.unsupported = Your browser is not WebAuthn compatible
 idp.webauthn.passwordless.explain = If you've enrolled a passkey or device/token for passwordless login, please enter your username below and press the corresponding button.
 
 idp.webauthn.enrollment.url = /idp/profile/admin/webauthn-registration
+idp.webauthn.enrollment = Register new credential
 
-idp.webauthn.register.credential.nickanme = Credential Nickname
+idp.webauthn.register.registered.keys = Registered keys for
+idp.webauthn.register.credential.nickanme = Credential nickname
 idp.webauthn.register.credential.remove.confirm = Are you sure
 idp.webauthn.register.table.header.keyName = Key Name
 idp.webauthn.register.table.header.authenticatorDescription = Authenticator
@@ -30,14 +32,17 @@ idp.webauthn.register.table.header.action = Action
 idp.webauthn.register.table.unknownCredential = unknown
 idp.webauthn.register.credential.remove = Remove
 idp.webauthn.register.registered.noKeys = You have no registered keys
-idp.webauthn.register.addKey = Add New Security Key
+idp.webauthn.register.addKey = Add new security key
 idp.webauthn.register.finish = Finish
-idp.webauthn.register.submit = Submit Registration
-idp.webauthn.register.username.explain = Please enter your username below and press the corresponding button.
+idp.webauthn.register.submit = Submit registration
+idp.webauthn.register.username.explain = Please enter your username below.
 idp.webauthn.register.username.proceed = Next
 
+idp.webauthn.admin.search.title = Search for user
+
+idp.webauthn.ended = Your session has ended
 
 # When debug information has been enabled
 idp.webauthn.debug.title = Debugging
-idp.webauthn.debug.request = Request Options
-idp.webauthn.register.debug.registration = Registration Options
\ No newline at end of file
+idp.webauthn.debug.request = Request options
+idp.webauthn.register.debug.registration = Registration options
\ No newline at end of file
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn-username.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn-username.vm
index 429b5dc..1a2fc08 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn-username.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-authn-username.vm
@@ -71,7 +71,7 @@ $response.addHeader("Content-Security-Policy", "script-src-elem 'nonce-$nonce'")
                 #end
 
                 <blockquote>#springMessageText("idp.webauthn.passwordless.explain", "If you've enrolled a passkey or device/token for passwordless login,
-                please enter your username below and press the corresponding button.")</blockquote>
+                please enter your username below.")</blockquote>
                         
                 <form name="username-entry" action="$flowExecutionUrl" method="post">
                     #parse("csrf/csrf.vm")
@@ -96,7 +96,7 @@ $response.addHeader("Content-Security-Policy", "script-src-elem 'nonce-$nonce'")
                 </form>
     
                 <ul>
-                    <li><a href="#springMessageText('idp.webauthn.enrollment.url', '/idp/profile/admin/webauthn-registration')">#springMessageText("idp.webauthn.enrollment", "Enroll New Devices")</a></li>
+                    <li><a href="#springMessageText('idp.webauthn.enrollment.url', '/idp/profile/admin/webauthn-registration')">#springMessageText("idp.webauthn.enrollment", "Register new credentials")</a></li>
                     <li><a href="#springMessageText('idp.url.helpdesk', '#')">#springMessageText("idp.login.needHelp", "Need Help?")</a></li>
                 </ul>
             </section>
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 7d6ad5b..98643b9 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
@@ -120,7 +120,7 @@
                         <input type="hidden" id="publicKeyAssertion" name="publicKeyAssertion" />
                         <button class="hidden" id="authenticationSubmit" type="submit"
                             name="_eventId_proceed">#springMessageText("idp.webauthn.authn.authenticate.submit", "Submit
-                        Authentication")</button>
+                        authentication")</button>
                     </form>
                     <div class="centre">
                         <button id="authenticate"
@@ -146,7 +146,7 @@
                 #springMessageText("idp.webauthn.authn.unsupported", "Your browser is not WebAuthn compatible")
             </div>
              <ul>
-                    <li><a href="#springMessageText('idp.webauthn.enrollment.url', '/idp/profile/admin/webauthn-registration')">#springMessageText("idp.webauthn.enrollment", "Enroll New Devices")</a></li>
+                    <li><a href="#springMessageText('idp.webauthn.enrollment.url', '/idp/profile/admin/webauthn-registration')">#springMessageText("idp.webauthn.enrollment", "Register new credential")</a></li>
                     <li><a href="#springMessageText('idp.url.helpdesk', '#')">#springMessageText("idp.login.needHelp", "Need Help?")</a></li>
                 </ul>
         </section>
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-end.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-end.vm
index c66ba71..45110d0 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-end.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-end.vm
@@ -61,7 +61,7 @@
                 <p>$encoder.encodeForHTML($desc)</p>
             #end
             <div class="content">
-                    #springMessageText("idp.webauthn.authn.register.ended", "Your registration session has ended")                    
+                    #springMessageText("idp.webauthn.ended", "Your session has ended")                    
             </div>
         </section>
         <footer>
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management-search.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management-search.vm
index c6cf1b6..90e752f 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management-search.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management-search.vm
@@ -42,7 +42,7 @@
                         <p id="error_message"></p>
                   </div>                
                   <div>
-                     <h1>#springMessageText("idp.webauthn.admin.search.title", "Search For Users")</h1>
+                     <h1>#springMessageText("idp.webauthn.admin.search.title", "Search for user")</h1>
                      <form id="username_search_form" action="$flowExecutionUrl" method="post">
                          #parse("csrf/csrf.vm")
                          <label for="username_search">#springMessageText("idp.webauthn.admin.search.label", "Username")</label>
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm
index be0d962..bd2ace1 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-management.vm
@@ -98,7 +98,7 @@
                        #parse("csrf/csrf.vm")   
                        <div class="grid">
                         <div class="grid-item">
-                            <button id="searchButton" type="submit" name="_eventId_again">#springMessageText("idp.webauthn.admin.search.again", "Search Again")</button>
+                            <button id="searchButton" type="submit" name="_eventId_again">#springMessageText("idp.webauthn.admin.search.again", "Search again")</button>
                              <button id="finish_button" type="submit" name="_eventId_finish">#springMessageText("idp.webauthn.admin.finish", "Finish")</button>
                         </div> 
                       </div>                        
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register-username.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register-username.vm
index d3310e4..5eed5f1 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register-username.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register-username.vm
@@ -42,7 +42,7 @@ $response.addHeader("Content-Security-Policy", "script-src-elem 'nonce-$nonce'")
                 <img class="main-logo" src="$request.getContextPath()#springMessageText("idp.logo", "/images/placeholder-logo.png")" alt="#springMessageText("idp.logo.alt-text", "logo")" />                
             </header>            
             <section>  
-                <blockquote>#springMessageText("idp.webauthn.register.username.explain", "Please enter your username below and press the corresponding button.")</blockquote>
+                <blockquote>#springMessageText("idp.webauthn.register.username.explain", "Please enter your username below.")</blockquote>
 
                 <form name="username-entry" action="$flowExecutionUrl" method="post">
                     #parse("csrf/csrf.vm")
diff --git a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register.vm b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register.vm
index 1ac6697..7cdd875 100644
--- a/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register.vm
+++ b/webauthn-impl/src/main/resources/net/shibboleth/idp/plugin/authn/webauthn/views/webauthn-register.vm
@@ -118,7 +118,7 @@
                         <p id="error_message"></p>
                   </div>                
                   <div>
-                     <h1>'$encoder.encodeForHTML($webauthnRegContext.username)' #springMessageText("idp.webauthn.register.registered.keys","Registered Keys")</h1>
+                     <h1>#springMessageText("idp.webauthn.register.registered.keys","Registered keys for") '$encoder.encodeForHTML($webauthnRegContext.username)'</h1>
                      #if ($webauthnRegContext.existingCredentials)
                          <table>
                             <tr>
@@ -161,7 +161,7 @@
                      <br/>
                      <div class="grid">
                         <div class="grid-item">
-                            <button id="registerButton">#springMessageText("idp.webauthn.register.addKey", "Add New Security Key")</button>
+                            <button id="registerButton">#springMessageText("idp.webauthn.register.addKey", "Add new security key")</button>
                             <form id="finish_button_form" action="$flowExecutionUrl" method="post" class="inline">
                                #parse("csrf/csrf.vm")                           
                                <button id="finish_button" type="submit" name="_eventId_finish">#springMessageText("idp.webauthn.register.finish", "Finish")</button>

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


More information about the commits mailing list