Manual Chapter :
Adding images and
customizing buttons for the OAuth Logon Page
Applies To:
Show VersionsBIG-IP APM
- 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0
Adding images and
customizing buttons for the OAuth Logon Page
You might want to add an image for a custom OAuth
provider or use an image other than the ones that are available in the advanced
customization template. You might also want to customize the colors you use for an OAuth
provider.
- On the Main tab, select.The Customization screen displays with the Branding tab selected.
- Navigate to theOAuth Logon Pagefolder for your per-session policy (located in theAccess Profilesfolder) or your per-request policy (located in thePer-Request Policiesfolder).
- Expand theOAuth Logon Pagefolder and, in it, clickAdvanced Customization.An Advanced Customization Images screen displays.
- To upload a new image:For best results make sure that the image is 25 x 25 px.
- ClickImage Browser.An Image Browser popup screen opens.
- ClickAdd Image, find and select the image, and clickOpen.The image loads and a thumbnail opens.
- Close the Image Browser popup screen.
- Back on the Advanced Customization Images screen, in anyValuefield that contains/public/images/my/tr.gif(a default value), click the field, then click the icon that displays at the end of the field, then clickReplace.A Choose an Image popup screen opens.
- Select the image that you uploaded previously, then clickChange.The popup screen closes. A path and the name of the image file that you chose displays in theValuefield.
- On your keyboard, press Enter to finalize the change; then, on your screen on the menu bar, clickSave.In theValuefield, the path and the image file name completely change. The file name changes to something likeimagexx_nn.pngwherexxis a number andnnrepresents a language code.
- Click the new value, copy it, and paste it to a text file to save it temporarily.You will need to paste this exact value into the code for the OAuth Logon Page in a later step.
- From theViewlist at the top right of the screen, selectAdvanced Customization.The Customization tool switches to the advanced view.
- In theOAuth Logon Pagefolder, clicklogon.inc.The code displays in the Advanced Customization Editor.
- Search for the phraseauthLoginSelectCusts.The phrase displays within these lines of code:/* BEGIN OF ADDED CODE */ $settings = ["patchFieldId" => "oauthprovidertype", "patchFieldValue" => "ROPC"]; $authLoginSelectCusts = [ "__default__" => ["/public/images/my/tr.gif", "#e59c91", "#D92138", "#FFFFFF"], // please use low case in keys because of $authLoginSelectCusts[strtolower($o)] later in code "f5" => ["/public/images/my/flogo_mobile.png", "#ea7281", "#D92138", "#FFFFFF"], "google" => ["/public/images/customization/Common/vs-show-profile-2_act_oauth_logon_page_ag/image00_en.png", "#96C3E0", "#557CBF", "#FFFFFF"], "facebook" => ["/public/images/customization/Common/vs-show-profile-2_act_oauth_logon_page_ag/image01_en.png", "#7b94ca", "#4768b2", "#FFFFFF"], "ping" => ["/public/images/customization/Common/vs-show-profile-2_act_oauth_logon_page_ag/image02_en.png", "#EE6E81", "#EA4A62", "#FFFFFF"] ];The code specifies an OAuth provider name in lowercase, an image name and path, and hexadecimal color codes for the foreground, background, and text.
- Duplicate one of the lines of code for a provider.For example, your result might look like this:"f5" => ["/public/images/my/flogo_mobile.png", "#ea7281", "#D92138", "#FFFFFF"], "f5" => ["/public/images/my/flogo_mobile.png", "#ea7281", "#D92138", "#FFFFFF"],
- Update the duplicated line of code:
- Replace the provider name with a provider name that you specified in the properties for the OAuth Logon Page (as configured in the visual policy editor).Type the provider name in lowercase, regardless of the case you used in the visual policy editor when you configured the OAuth Logon Page properties.
- Replace the image name and path with the exact image name and path that you copied from the Advanced Customization Images screen.
- Replace the hexadecimal color codes with the ones you want to use.
Your result, for example, might look like this:"f5" => ["/public/images/my/flogo_mobile.png", "#ea7281", "#D92138", "#FFFFFF"], "siterequest" => ["/public/images/customization/Common/vs-profile-2_act_oauth_logon_page_ag/image03_en.png", "#FFFFFF", "#000000", "#FF0000"], - On the menu bar, clickSave.
- If you want to remove the Logon button from the OAuth Logon Page screen, you can do that while you are still in the Advanced Customization view:
- In theOAuth Logon Pagefolder, clicklogon.inc.
- Search for and remove these lines of code:<tr id="submit_row"> <? if( $GLOBALS["label_position"] == "above" ){ ?> <td class="credentials_table_unified_cell"><input type=submit class="credentials_input_submit" value="%[logon]"></td> <? }else{ ?> <td class="credentials_table_label_cell" ></td> <td class="credentials_table_field_cell"><input type=submit class="credentials_input_submit" value="%[logon]"></td> <? } ?> </tr>
- On the menu bar, clickSave.
- If you've been working on a per-session policy, click theApply Access Policylink.