Configuring basic authentication in Pega Platform 8.2
Since version 8.2, Pega Platform builds Mobile apps using OAuth 2.0 authorization code flow between the Platform and Mobile app as a default. It is still possible to use the deprecated Basic authentication, and we will learn how to do this.
For Pega Platform 8.2, Basic authentication is available only in HC version 7.41.2. It is not and will not be supported in Pega Infinity Mobile Client 8.x.
Configuring Mobile Channel
To set the Basic authentication, user has to:
- Set Client version to Legacy - with this step, we ensure that Pega Platform builds mobile app using HC7. To do this, you have to:
- choose one of the platforms
- click on Release channels
- check Enforce specific mobile client version
- select Legacy from the list of client versions
- Upload correct assets.zip file - in this step, we prepare the assets.zip to enclose the Basic authentication configuration. To do this, you have to:
- click the Layout tab on Mobile channel
- click Custom under App branding
- download the assets.zip template using link from Pega Platform (!!! use branding-assets-advanced.zip file !!!), or use the uploaded file (see Attached files section at the bottom of this article)
- if you have downloaded the template using link from Pega Platform:
- unpack the zip file
- edit custom.properties file
- add container.authentication.type=basic line at the end of the file
- pack all files
- upload created zip file to Pega Platform
- Finish up configuration of Mobile Channel - in this step we finalize the configuration. To do this, you have to:
- go to Configuration tab
- name your newly created app
- select Mobile certificate
- save the Mobile channel
- and finally click Build Now button
- Edit offlinehttp (offline-enabled apps only) - in this step, we reconfigure the offlinehttp Service package. To do this, you have to:
- open offlinehttp Service package
- change Authentication type to Basic
- Save
- After build is done, install app on your device and enjoy Basic authentication on your device!