Interface PasswordProvider


@Deprecated(since="2026-04-30") public interface PasswordProvider
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
Interface for providing a password to a Parser for handling Encrypted and Password Protected Documents. An implementation of this should be set on the ParseContext supplied to Parser.parse(java.io.InputStream, org.xml.sax.ContentHandler, Metadata, ParseContext) to provide a way to get the document password. An implementation of this interface defines some specific selection or lookup criteria, to be applied against the document metadata passed to the getPassword(Metadata) method.
Since:
Apache Tika 1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Looks up the password for a document with the given metadata, and returns it for the Parser.
  • Method Details

    • getPassword

      String getPassword(Metadata metadata)
      Deprecated.
      Looks up the password for a document with the given metadata, and returns it for the Parser. If no password is available for the document, will return null.
      Parameters:
      metadata - document metadata
      Returns:
      The document decryption password, or null if not known