Interface NuggetCliSecretReader

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface NuggetCliSecretReader
Supplies shortest-scope PIN material to the nugget CLI when an interactive command explicitly asks for it.

Implementations must return a fresh mutable character array and must not retain a reference to the returned value. The CLI clears working copies where practical after submission or rejection. A null or empty result means that secure secret input is unavailable.

  • Method Details

    • readPin

      char[] readPin(String prompt)
      Reads a PIN for the supplied safe prompt.
      Parameters:
      prompt - safe prompt text
      Returns:
      mutable PIN characters, or null when unavailable
    • console

      static NuggetCliSecretReader console()
      Returns a reader backed by System.console().
      Returns:
      console-backed secret reader