Older versionVersion 2.7SolutionsUse of translation parameter on HTTP authenticator

Use of translation parameter on HTTP authenticator

This document is written for PhenixID Server.

This document describes how the parameter 'translation' can be used on authenticators.

The reader should have some basic knowledge about PhenixID Server.

Make sure to have a backup of the files being edited.

Description

The parameter 'translation' can be used on authenticators, to add customized text to login templates.

This document will show an example of how this can be done.

Templates are located in:
<PhenixIDinstallationdirectory>/mods/com.phenixidentity~auth-http~<version>/templates

Language files are located in:
<PhenixIDinstallationdirectory>/mods/com.phenixidentity~auth-http~<version>/web/res/lang

Make sure to have a backup of the files being edited.

Configuration

Login to the Configuration portal, click the tab 'Advanced', click on the pencil next to 'Authentication - HTTP' and find the authenticator that should have customized text. Add the parameter 'translation' according to the example below.

{
    "alias" : "238160c4-7fdf-42e4-8705-26f5911792bc",
    "name" : "PostUidAndPassword",
    "configuration" : {
      "pipeID" : "2a1537c4-e537-49b5-9e5b-921c053e7c0b",
      "successURL" : "/selfservice/",
      "translationKey" : "login.messages.information.body.enduser",
      "headingtranslationKey" : "login.messages.information.header.enduser",
      "title" : "login.messages.information.title.enduser",
      "allowLanguageChange" : "true",
      "translation" : [
                "SelfServiceLogin",
                "MFALogin"
        ]
    }
  }

Click Stage Changes and Commit Changes.

We can now use the value 'SelfServiceLogin', in the templates. For this example we will use login.template.

Add the value accordingly:

<div class="col-xs-6 col-md-6">
    <div id="signin-wrapper">
        {{#login.messages.generalerror}}
            <div class="alert alert-danger">
                {{login.messages.generalerror}}
            </div>
        {{/login.messages.generalerror}}
	{{SelfServiceLogin}}
        <input class="form-control" id="username" placeholder="{{login.messages.username}}" required="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="username" type="text">
        <input class="form-control" placeholder="{{login.messages.password}}" autocomplete="off" required="" name="password" type="password">
        <input class="form-control securitycode" placeholder="Security code" autocomplete="off" name="securitycode" type="input">
        {{#enable_ot}}
            <div class="form-group">
                <div class="checkbox">

When this is done we can add our customized text to the desired language file (strings.xml):

<!-- User name & password template general -->
    <string name="SelfServiceLogin">Enter username and password to login.</string>
    <string name="login.messages.heading">Please sign in</string>
    <string name="login.messages.username">Username</string>
    <string name="login.messages.password">Password</string>
    <string name="login.messages.signin">Sign in</string>

Changes in the language files require a restart of the service.

The result after the changes should look like this: