AshAuthentication. BankID. UserMessages
(ash_authentication_bankid v0.1.3)
View Source
User-facing messages for BankID authentication in multiple languages.
Provides translations for UI text and hint codes based on BankID's
recommended user messages. Supports Swedish (:sv) and English (:en).
Usage
iex> UserMessages.hint_message("outstandingTransaction", :en)
"Starting BankID..."
iex> UserMessages.hint_message("userCancel", :sv)
"Åtgärden avbröts."
iex> UserMessages.ui_text(:title, :en)
"Start the BankID app"
Summary
Functions
Get translated message for a BankID hint code.
Get timeout message with the number of minutes.
Get translated UI text for the BankID authentication page.
Types
Functions
Get translated message for a BankID hint code.
Parameters
hint_code- The hint code from BankID API (e.g., "outstandingTransaction")locale- Language locale (:enor:sv, defaults to:en)
Examples
iex> hint_message("started", :en)
"BankID app opened. Please complete authentication."
iex> hint_message("userCancel", :sv)
"Åtgärden avbröts."
Get timeout message with the number of minutes.
Parameters
minutes- Number of minutes for timeoutlocale- Language locale (:enor:sv, defaults to:en)
Examples
iex> timeout_message(5, :en)
"Authentication timed out after 5 minutes"
iex> timeout_message(1, :sv)
"Autentiseringen avbröts efter 1 minut"
Get translated UI text for the BankID authentication page.
Parameters
key- The UI element key (atom)locale- Language locale (:enor:sv, defaults to:en)
Examples
iex> ui_text(:title, :en)
"Start the BankID app"
iex> ui_text(:title, :sv)
"Starta BankID-appen"