Issue
-
How to configure Liferay to invoke web services with Digest Auth and use it in a client. As example we'll use POSTMAN
Environment
- Liferay DXP 7.1+
Resolution
- As example, we are going to configure the access to http://localhost:8080/api/jsonws/company/get-companies method in POSTMAN:
- Configure Digest Authentication:
-
System Settings > API Authentication > Digest Authentication
- Force Digest Authentication: True
- Enabled: True
- Hosts Allowed: n/a
- URLs Excludes: n/a
- URLs Includes: /api/jsonws/company/*
-
System Settings > API Authentication > Digest Authentication
- Configure a new System Access Policy:
- Name: COMPANY_ACCESS
- Enabled: true
- Default: false
- Title: COMPANY_ACCESS
-
Allowed Service Signatures:
- Service Class:
- Method Name: n/a
- Open a session in POSTMAN:
- Create a new request this way (select Digest Auth and add the user and pass)
- Uncheck the "Yes disable retrying" option
- Test that results are returned:
- Configure Digest Authentication: