prime.js
prime.js copied to clipboard
Browser detection and user agent Webhook logging does not correctly detect Windows Edge
The hosted login pages need to be updated to account for Windows Edge. This will allow the deviceName and userAgent for a Webhook log entry to be correct. For example, Chrome was detected as the browser on a Windows machine using the Edge browser in this Webhook log entry:
"event" : {
"applicationId" : "6e880a8a-1f32-4dcd-a7ef-d4e6e6bc8d75",
"authenticationType" : "PASSWORD",
"connectorId" : "e3306678-a53a-4964-9040-1c96f36dda72",
"createInstant" : 1742418034213,
"id" : "2aa687c3-03c3-49e0-9acf-4c0feb19227d",
"info" : {
"deviceName" : "Windows Chrome",
"deviceType" : "BROWSER",
"ipAddress" : "158.81.192.233",
"location" : {
"city" : "San Marcos",
"country" : "US",
"displayString" : "San Marcos, TX, US",
"latitude" : 29.88327,
"longitude" : -97.94139,
"region" : "TX",
"zipcode" : "78666"
},
"userAgent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0"
},
.
.
.
}
Many of the theme templates import the helpers template [#import "../_helpers.ftl" as helpers/]which in turn includes the prime.js framework using <script src="${request.contextPath}/js/prime-min-1.7.0.js?version=${version}"></script>
The browser detection file needs to be updated, https://github.com/inversoft/prime.js/blob/78b2ae54a827ddd966fb5b589a609a88f064c914/src/main/js/Browser.js