Class UserVisibleData
java.lang.Object
se.swedenconnect.bankid.rpapi.service.UserVisibleData
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DataToSign
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the text to be displayed.Gets the identifier for formatting the user visible data.void
setDisplayText
(String displayText) Assigns the text that will be displayed to the user.void
setUserVisibleData
(String userVisibleData) Assigns theuserVisibleData
.void
setUserVisibleDataFormat
(String userVisibleDataFormat) Assigns the identifier for formatting the user visible data.toString()
-
Field Details
-
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
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
Assigns theuserVisibleData
. 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
Returns the text to be displayed. The returned string is Base64 encoded.- Returns:
- text to be displayed and signed (base64-encoded)
-
getUserVisibleDataFormat
Gets the identifier for formatting the user visible data.- Returns:
- formatting identifier or
null
if not assigned
-
setUserVisibleDataFormat
Assigns the identifier for formatting the user visible data.- Parameters:
userVisibleDataFormat
- formatting identifier
-
toString
-