Skip to content

Commit

Permalink
chore: better docs and code structure
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed May 21, 2024
1 parent 09abbc5 commit 12228d0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
9 changes: 9 additions & 0 deletions src/appier_extras/parts/admin/models/credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@


class Credential(base.Base):
"""
Model that represents a credential that is associated with
an account, this credential may be used for authentication
purposes and may be of different types (eg: FIDO2).
It is expected that the FIDO2 authentication is going to be
performed using WebAuthn and the credential is going to be
created using the `navigator.credentials.create` method.
"""

credential_id = appier.field(
index=True, immutable=True, description="Credential ID"
Expand Down
14 changes: 7 additions & 7 deletions src/appier_extras/parts/admin/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@
};
})(jQuery);

jQuery(document).ready(function() {
var _body = jQuery("body");
_body.bind("applied", function(event, base) {
base.uapply();
});
});

function base64ToUint8Array(base64, urlSafe = true) {
if (urlSafe) {
base64 = base64.replace(/-/g, "+").replace(/_/g, "/");
Expand Down Expand Up @@ -166,10 +173,3 @@ function serializePublicKeyCredential(publicKeyCredential) {

return serialized;
}

jQuery(document).ready(function() {
var _body = jQuery("body");
_body.bind("applied", function(event, base) {
base.uapply();
});
});

0 comments on commit 12228d0

Please sign in to comment.