Class UserVisibleData

java.lang.Object
se.swedenconnect.bankid.rpapi.service.UserVisibleData
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataToSign

public class UserVisibleData extends Object implements Serializable
Class that represents the BankID userVisibleData and userVisibleDataFormat parameters that may be used in calls to authenticate and sign.
Author:
Martin Lindström
See Also:
  • Field Details

    • VISIBLE_DATA_FORMAT_SIMPLE_MARKDOWN_V1

      public static final String VISIBLE_DATA_FORMAT_SIMPLE_MARKDOWN_V1
      Constant for the Simple Markdown V1 format.
      See Also:
  • Constructor Details

    • UserVisibleData

      public UserVisibleData()
      Default constructor.
  • Method Details

    • setDisplayText

      public void setDisplayText(String displayText)
      Assigns the text that will be displayed to the user.

      By using this method, the caller can assign the text that will be displayed to the user. The method will take care of Base64-encoding.

      Parameters:
      displayText - the (non-encoded) display text
      See Also:
    • setUserVisibleData

      public void setUserVisibleData(String userVisibleData)
      Assigns the userVisibleData. This is the text to be displayed. The text can be formatted using CR, LF and CRLF for new lines. The text must be encoded as UTF-8 and then Base64 encoded.

      See also setDisplayText(String).

      Parameters:
      userVisibleData - base64-encoded data to be displayed
    • getUserVisibleData

      public String getUserVisibleData()
      Returns the text to be displayed. The returned string is Base64 encoded.
      Returns:
      text to be displayed and signed (base64-encoded)
    • getUserVisibleDataFormat

      public String getUserVisibleDataFormat()
      Gets the identifier for formatting the user visible data.
      Returns:
      formatting identifier or null if not assigned
    • setUserVisibleDataFormat

      public void setUserVisibleDataFormat(String userVisibleDataFormat)
      Assigns the identifier for formatting the user visible data.
      Parameters:
      userVisibleDataFormat - formatting identifier
    • toString

      public String toString()
      Overrides:
      toString in class Object