<?xml version="1.0" encoding="UTF-8"?>
<!--
pragmatickm-password-taglib - Passwords nested within SemanticCMS pages and elements in a JSP environment.
Copyright (C) 2013, 2014, 2015, 2016, 2017, 2019, 2020, 2021, 2022, 2025, 2026  AO Industries, Inc.
    support@aoindustries.com
    7262 Bull Pen Cir
    Mobile, AL 36695

This file is part of pragmatickm-password-taglib.

pragmatickm-password-taglib is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

pragmatickm-password-taglib is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with pragmatickm-password-taglib.  If not, see <https://www.gnu.org/licenses/>.
-->
<taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
                      https://jakarta.ee/xml/ns/jakartaee/web-jsptaglibrary_3_1.xsd"
  version="3.1">
  <!-- datePublished="2016-08-15T01:53:54-05:00" -->
  <!-- dateModified="2016-11-10T22:35:14-06:00" -->
  <description><![CDATA[
    <p>Passwords nested within <a target="_top" href="https://semanticcms.com/">SemanticCMS</a> pages and elements in a JSP environment.</p>
  ]]></description>
  <display-name>PragmaticKM Password Taglib</display-name>
  <tlib-version>
    <!-- Release: 2.0.0-POST-SNAPSHOT -->
    2.0.0
  </tlib-version>
  <short-name>password</short-name>
  <uri>https://pragmatickm.com/password/taglib/</uri>
  <tag>
    <!-- datePublished="2016-08-15T01:53:54-05:00" -->
    <!-- dateModified="2017-07-27T20:52:02-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Writes a password, with optional username and href.
      </p>
      <p>
        May optionally be nested inside a <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-passwordTable">&lt;password:passwordTable&gt;</a> to be
        displayed in a table format with other passwords.
      </p>
      <p>
        Custom fields may be associated with the password through nested
        <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-customField">&lt;password:customField&gt;</a> tags.
      </p>
      <p>
        Secret questions and answers may be associated with the password through nested
        <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-secretQuestion">&lt;password:secretQuestion&gt;</a> tags.
      </p>
      <p>
        Must be nested inside a <a href="https://semanticcms.com/core/taglib/semanticcms-core.tld/tag-page">&lt;core:page&gt;</a> page to provide page password
        information for different site views.
      </p>
    ]]></description>
    <name>password</name>
    <tag-class>com.pragmatickm.password.taglib.PasswordTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          An optional page-unique ID for the password.
        </p>
        <p>
          This id may be used to obtain the password from other pages.
        </p>
      ]]></description>
      <name>id</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>The required password.</p>
      ]]></description>
      <name>password</name>
      <required>true</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>The username required for login.</p>
      ]]></description>
      <name>username</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>The URL of the password-protected resource.</p>
      ]]></description>
      <name>href</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <dynamic-attributes>true</dynamic-attributes>
  </tag>
  <tag>
    <!-- datePublished="2016-08-18T03:05:24-05:00" -->
    <!-- dateModified="2017-07-27T20:52:02-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Provides a custom field to a <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-password">&lt;password:password&gt;</a>.
      </p>
      <p>
        Must be nested inside a <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-password">&lt;password:password&gt;</a> tag.
      </p>
    ]]></description>
    <name>customField</name>
    <tag-class>com.pragmatickm.password.taglib.CustomFieldTag</tag-class>
    <body-content>empty</body-content>
    <attribute>
      <description><![CDATA[
        <p>The name of the field.</p>
      ]]></description>
      <name>name</name>
      <required>true</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          The book containing the page.
        </p>
        <p>
          Defaults to the book of the current JSP file.
        </p>
      ]]></description>
      <name>book</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          The page-relative path to the page this field references.
        </p>
        <p>
          Required when value is not provided.
        </p>
      ]]></description>
      <name>page</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          The page-unique id of the element to link to with the target page.
        </p>
        <p>
          To avoid broken links, may not link to generated ids; set explicit ids on target elements.
          May only be provided when page attribute is provided.
        </p>
      ]]></description>
      <name>element</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          The value of the field.
        </p>
        <p>
          Required when page is not provided.
          When both page and value are provided, this overrides the page title.
        </p>
      ]]></description>
      <name>value</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
  </tag>
  <tag>
    <!-- datePublished="2016-08-18T03:01:37-05:00" -->
    <!-- dateModified="2017-07-27T20:52:02-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Provides a secret question and answer to a <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-password">&lt;password:password&gt;</a>.
      </p>
      <p>
        Must be nested inside a <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-password">&lt;password:password&gt;</a> tag.
      </p>
    ]]></description>
    <name>secretQuestion</name>
    <tag-class>com.pragmatickm.password.taglib.SecretQuestionTag</tag-class>
    <body-content>empty</body-content>
    <attribute>
      <description><![CDATA[
        <p>The question that may be asked.</p>
      ]]></description>
      <name>question</name>
      <required>true</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>The correct answer to the question.</p>
      ]]></description>
      <name>answer</name>
      <required>true</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
  </tag>
  <tag>
    <!-- datePublished="2016-08-15T01:53:54-05:00" -->
    <!-- dateModified="2021-06-16T14:18:10-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Displays any passwords from nested <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-password">&lt;password:password&gt;</a> tags in a
        table format.
      </p>
      <p>
        Any HTML in the body is displayed in the detailed comments area.
      </p>
    ]]></description>
    <name>passwordTable</name>
    <tag-class>com.pragmatickm.password.taglib.PasswordTableTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          The id used in URL anchors.
        </p>
        <p>
          If not provided, is generated from the header.
          Must be unique per page.
          Ids generated from headers will be unique, but may change as page structure changes.
        </p>
      ]]></description>
      <name>id</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          The value to display in the table header.
        </p>
        <p>
          Defaults to "Passwords".
          If set to an empty string, the header is not added.
        </p>
      ]]></description>
      <name>header</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          An <a rel="nofollow" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html">Iterable</a> of passwords to add before any nested <a href="https://pragmatickm.com/password/taglib/pragmatickm-password.tld/tag-password">&lt;password:password&gt;</a> tags.
        </p>
        <p>
          These passwords will not add page links.
        </p>
      ]]></description>
      <name>passwords</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.Iterable</type>
        <!-- type="java.lang.Iterable<? extends com.pragmatickm.password.model.Password>" -->
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          Optional CSS style attribute.
        </p>
      ]]></description>
      <name>style</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.Object</type>
      </deferred-value>
    </attribute>
    <dynamic-attributes>true</dynamic-attributes>
  </tag>
  <function>
    <!-- datePublished="2016-08-15T01:53:54-05:00" -->
    <!-- dateModified="2021-06-16T13:13:48-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Generates a random password.
      </p>
      <p>
        When capture level is <a href="https://semanticcms.com/core/servlet/apidocs/com.semanticcms.core.servlet/com/semanticcms/core/servlet/CaptureLevel.html#PAGE">PAGE</a>
        or <a href="https://semanticcms.com/core/servlet/apidocs/com.semanticcms.core.servlet/com/semanticcms/core/servlet/CaptureLevel.html#META">META</a>,
        does not generate and just returns string "&lt;&lt;&lt;CAPTURING&gt;&gt;&gt;".
      </p>
    ]]></description>
    <name>generatePassword</name>
    <function-class>com.pragmatickm.password.taglib.Functions</function-class>
    <function-signature>java.lang.String generatePassword()</function-signature>
    <example><![CDATA[<code>${password:generatePassword()}</code>]]></example>
  </function>
  <function>
    <!-- datePublished="2016-08-15T01:53:54-05:00" -->
    <!-- dateModified="2021-06-16T13:13:48-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Generates a short but more random password.
      </p>
      <p>
        When capture level is <a href="https://semanticcms.com/core/servlet/apidocs/com.semanticcms.core.servlet/com/semanticcms/core/servlet/CaptureLevel.html#PAGE">PAGE</a>
        or <a href="https://semanticcms.com/core/servlet/apidocs/com.semanticcms.core.servlet/com/semanticcms/core/servlet/CaptureLevel.html#META">META</a>,
        does not generate and just returns string "&lt;&lt;&lt;CAPTURING&gt;&gt;&gt;".
      </p>
    ]]></description>
    <name>generateShortPassword</name>
    <function-class>com.pragmatickm.password.taglib.Functions</function-class>
    <function-signature>java.lang.String generateShortPassword()</function-signature>
    <example><![CDATA[<code>${password:generateShortPassword()}</code>]]></example>
  </function>
</taglib>
