Allow history fields to be translated in templates
Summary
- add
_auth => Auth
tosessionDataToRemember
- In login history, the raw value of _auth is displayed
- It would be nice to show a friendlier label to users, such as "Some IDP" or "France Connect" etc.
Design proposition
In mkSessionArray
we build a list of values
values => [ map { { v => $session->{$_} } } @fields ],
We should also populate the key, and not just the value, in this list
values => [ map { { v => $session->{$_}, k => $_, "k_$_" => 1 } } @fields ]
This allows sessionArray.tpl to use something like
<TMPL_LOOP NAME="values">
<TMPL_IF k__auth>
<td><span trspan="auth_<TMPL_VAR NAME="v">"><TMPL_VAR NAME="v"></span></td>
<TMPL_ELSE>
<td><TMPL_VAR NAME="v"></td>
</TMPL_IF>
</TMPL_LOOP>
Just define the auth_SAML
translation key and you get: