BoxLang 🚀 A New JVM Dynamic Language Learn More...
Install CBSecurity Passkeys box install cbsecurity-passkeys
Add Java libs from cbsecurity-passkeys
this.javaSettings = {
loadPaths : [ "./modules/cbsecurity-passkeys/lib" ],
loadColdFusionClassPath : true,
reloadOnChange : true
};
Implement the ICredentialRepository
interface. (See
an example in /resources/examples/quick/Passkey.cfc
)
Configure your credentialRepositoryMapping
in config/ColdBox.cfc
moduleSettings = {
"cbsecurity-passkeys": {
"credentialRepositoryMapping": "Passkey"
}
}
allowedOrigins
moduleSettings = {
"cbsecurity-passkeys": {
"credentialRepositoryMapping": "Passkey",
"allowedOrigins": [ "example.com" ]
}
}
Integrate using the includes/passkeys.js
library:
<script src="/modules/cbsecurity-passkeys/includes/passkeys.js"></script>
<script type="module">
if ( await window.cbSecurity.passkeys.isSupported() ) {
await window.cbSecurity.passkeys.register(
// redirectLocation ("/")
);
}
</script>
<script type="module">
if ( await window.cbSecurity.passkeys.isSupported() ) {
await window.cbSecurity.passkeys.login(
// username (optional)
// redirectLocation ("/")
// additionalParams ({})
)
}
</script>
<script>
window.cbSecurity.passkeys.autocomplete(
// redirectLocation ("/")
// additionalParams ({})
);
</script>
$
box install cbsecurity-passkeys