Authentication method images - Google Login Image

Logos can be displayed for external authentication methods on the login screen.

Setup steps

1. template.properties

Method images are controlled by the template properties.

Example: Add following in default.properties/ <custom_template_name>.properties

File location: /usr/local/ubisecure/ubilogin-sso/ubilogin/custom/templates/default.properties or

/usr/local/ubisecure/ubilogin-sso/ubilogin/custom/templates/<custom_template_name>

usemethodlogoimages = true usemethodtextlink = true methodimage.index = methodimage.index
  • usemethodlogoimages → This property defines if graphical logos will be shown for method selection buttons. Default is false. If true, methodimage.index must be defined.

Example: usemethodlogoimages = true

  • usemethodtextlink → This property defines if the name of the method is shown below the logo. Default is true. This may be a requirement for accessibility and screen reader support.

Example: usemethodtextlink = false

  • methodimage.index → This property defines the lookup table used when matching a method name to an image. Different templates can point to different methodimage.index files. The physical location of file is defined in the ubilogin/custom/resource.index file.

Example 1: methodimage.index = methodimage.index

2. methodimage.index

The methodimage.index file provides mappings from method name to image resource name. The image resources must also be defined in the resource.index file. Image localization is possible by localized resources.

Create the methodimage.index file at location:

/usr/local/ubisecure/ubilogin-sso/ubilogin/custom/templates/methodimage.index

# # methodimage.index # # This file defines the images of authentication methods. # This file is used only if its name is defined in # the 'methodimage.index' property of the template # # Each line has the following syntax: # authentication_method = image_file_name google.oauth2.1 = login_google.png

An example of the corresponding properties in the resource.index is shown below.

3. resource.index

File location: /usr/local/ubisecure/ubilogin-sso/ubilogin/custom/resource.index

# # User Interface Resources # # custom/resource.index # # all logos referenced by tempates/methodimage.index are here google.oauth2.1 = login_google.png # resource/methodimage-accountchooser.index login_google.png = resources/login_google.png

Place the logo at location specified in resource.index.

Logo location: /usr/local/ubisecure/ubilogin-sso/ubilogin/custom/resources/login_google.png

Testing

Add the Google Authentication method to any application to test.

 

Â