Class Keygen
The keygen element represents a key-pair generator control for forms. It generates a public/private key pair and submits the public key to the server. This element is deprecated in HTML5 and should not be used in new projects. Modern web applications should use Web Crypto API instead.
Examples:
The following convenience methods are provided for constructing instances of this bean:
See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.juneau.bean.html5.HtmlElement
accesskey, attr, attrUri, class_, contenteditable, deminimize, dir, getAttr, getAttr, getAttrs, hidden, id, lang, onabort, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, oncuechange, ondblclick, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting, self, setAttrs, spellcheck, style, tabindex, title, toString, translate
-
Constructor Details
-
Method Details
-
autofocus
autofocus attribute.Automatically focus the form control when the page is loaded.
-
challenge
challenge attribute.Specifies a challenge string that will be packaged with the generated and signed public key. This is used for additional security in key generation processes.
The challenge string is typically provided by the server and used to verify the key generation.
- Parameters:
value- The challenge string to package with the generated key. Can benull to unset the attribute.- Returns:
- This object.
-
disabled
disabled attribute.Whether the form control is disabled.
This attribute uses deminimized values:
false - Attribute is not addedtrue - Attribute is added as"disabled" - Other values - Passed through as-is
-
form
form attribute.Associates the keygen element with a form element by specifying the form's ID. This allows the keygen to be placed outside the form element while still being part of the form.
The value should match the ID of a form element in the same document.
- Parameters:
value- The ID of the form element to associate with this keygen. Can benull to unset the attribute.- Returns:
- This object.
-
keytype
keytype attribute.Specifies the type of cryptographic key to generate.
Common values:
"RSA" - RSA key pair (default)"DSA" - DSA key pair"EC" - Elliptic curve key pair
- Parameters:
value- The type of cryptographic key to generate. Can benull to unset the attribute.- Returns:
- This object.
-
name
name attribute.Specifies the name of the keygen element. This name is used when the form is submitted and can be used to access the element via the form.elements API.
The name should be unique within the form and should not contain spaces or special characters.
- Parameters:
value- The name of the keygen element for submission and API access. Can benull to unset the attribute.- Returns:
- This object.
-