Issue
Is there a way we can use the data in the AUthorization Header in a WSO2 DSS service which will verify username password of a client? Say I have a table of login's of users and my superiors would want to authenticate user by putting the username/password in the authorization header? e.g curl -v -H "Authorization: Basic appuser p@sswd123" -X GET http://localhost:8281/service/SP1/user
this would return the details of the user if the login exists and if not then it would not return any details.
Solution
So, this is basically a table contains with some data, and the data you want to check will be passed in an HTTP header. I do not think, you can directly achieve this with pure DSS service. What you can do is, write simple Dataservice which takes username, password as two parameters to the service and retrive details from the database.
Front DSS with ESB, and create a proxy service to call your backend dataservice. In the proxy service, extract your HTTP header and pass username/password as parameters for your backend dataservice.
(Route all requests to ESB proxy service.)
Answered By - Ratha Answer Checked By - Robin (WPSolving Admin)