Changeset 8041
- Timestamp:
- Jun 2, 2022, 2:55:24 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.19-stable/doc/src/docbook/developer/extensions.xml
r7982 r8041 2686 2686 </sect3> 2687 2687 2688 <sect3 id=" pextensions_developer.login-manager.settings">2688 <sect3 id="extensions_developer.login-manager.settings"> 2689 2689 <title>Configuration settings</title> 2690 2690 … … 2747 2747 <para> 2748 2748 All installed and enabled login forms are available in a selection list 2749 from which the user can select to switch to another login form. For technical reasons2750 custom scripts and stylesheets are loaded for all installed login forms even2751 though only one is displayed at a time. Developers must ensure that CSS rules2752 and scripts are not affecting other login forms than the intended one.2749 from which the user can select to switch to another login form. Since BASE 3.19.3 2750 custom scripts and stylesheets are only loaded for the currently active form. 2751 In earlier BASE versions, custom scripts and stylesheets were loaded for all installed 2752 login forms. 2753 2753 </para> 2754 2754 <para> 2755 To help with this, BASE is setting two data-attributes on the 2755 It is possible for both style sheets and scripts to verify that they are only used on 2756 the intended login form. BASE is setting two data-attributes on the 2756 2757 <sgmltag class="starttag">body</sgmltag> tag: 2757 2758 </para> … … 2816 2817 </note> 2817 2818 2819 <sect3 id="extensions_developer.login-form.before-login"> 2820 <title>The before-login event</title> 2821 2822 <para> 2823 In BASE 3.19.3 the <code>before-login</code> was introduced. It is a custom event 2824 that is sent to the <sgmltag class="starttag">form</sgmltag> tag just before the 2825 login form is submitted to the server. Extensions may add event listeners for this 2826 event if they need to take some action and they have the possibility to cancel 2827 the submission by calling the <code>event.preventDefault()</code> method. 2828 </para> 2829 2830 <para> 2831 This functionality is, for example, used by the <ulink 2832 url="https://baseplugins.thep.lu.se/wiki/net.sf.basedb.webauthn">WebAuthn</ulink> extension, 2833 which need to contact the server to get a <emphasis>challenge</emphasis>, ask the user 2834 to insert and click on the security key, and then return the signed challenge in the 2835 <code>extraField</code> before the login form is actually submitted. Since all of this 2836 is handled asynchronously the <code>before-login</code> event need to be cancelled. The login 2837 form can be submitted by calling <code>Login.submitLoginForm()</code>. 2838 </para> 2839 </sect3> 2818 2840 </sect2> 2819 2841
Note: See TracChangeset
for help on using the changeset viewer.