Skip to content

EKIRJASTO-626 Let user reveal and copy book passphrase#67

Merged
natlibfi-ptalosel merged 13 commits intomainfrom
ekirjasto-626-let-user-reveal-and-copy-book-passphrase
Feb 26, 2026
Merged

EKIRJASTO-626 Let user reveal and copy book passphrase#67
natlibfi-ptalosel merged 13 commits intomainfrom
ekirjasto-626-let-user-reveal-and-copy-book-passphrase

Conversation

@natlibfi-ptalosel
Copy link
Contributor

@natlibfi-ptalosel natlibfi-ptalosel commented Feb 25, 2026

Description

  • This pull request adds a “book password” (LCP passphrase) feature to the E-kirjasto web application.
    • we want users to easily find and use the passphrase after downloading a book
    • EKIRJASTO-626
    • note: users do not need to enter the passphrase if they are reading the book directly online. It is only required when opening protected ebooks in separate reader software.

Passphrase is available in the book's details

  • a new UI component BookPassphrase was created for the passphrase feature along with some supporting UI components
    • users can now view the passphrase in readable text
    • users can copy the passphrase to the clipboard
    • instructions on how to use the passphrase are also available

Book type was updated

  • a new property called passphrase has been added to the Book type
  • the passphrase property is a string that contains the password

E-kirjasto OPDS feed parser dependency was upgraded

  • the ekirjasto-opds-feed-parser version is now locked at 2.1.0, which supports parsing LCP passphrase data

How Can This Be Tested?

  • Inspect new BookPassphrase UI component in the book details view

    • check that the passphrase is displayed correctly
    • check that instructions are also shown
    • check that the component meets minimum accessibility standards
    • check that passphrase is only visible for ebooks and PDFs and not for audiobooks
    • check that passphrase can be copied
  • Install dependencies

    • run npm ci
    • check that e-kirjasto-opds-parser version 2.1.0 is used
  • Run tests

    • check that both new and existing tests cover the passphrase feature
  • Test also the flow with Thorium Reader:

    • download ebook from the web application
    • copy the passphrase
    • open the book in Thorium Reader and paste the copied passphrase
    • read the book
  • Tested locally (note: clipboard API restrictions)
  • Tested on a mobile device
  • Tested with Firefox
  • Tested with Chrome
  • Tested with Edge
  • Tested with Safari

Checklist:

  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Review added atleast to E-kirjasto maintainers +1

@natlibfi-ptalosel natlibfi-ptalosel marked this pull request as ready for review February 25, 2026 23:08
@natlibfi-ptalosel natlibfi-ptalosel merged commit ea008f1 into main Feb 26, 2026
8 of 10 checks passed
@natlibfi-ptalosel natlibfi-ptalosel deleted the ekirjasto-626-let-user-reveal-and-copy-book-passphrase branch February 26, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants