Hello Team
We have an api-account in aem with user name and password.
Configured AEM Sling authentication service for HTTP basic authentication
We have servelts in AEM which will be called by non-aem projects. While calling the servlet, the client sends Bearer token in request header to authenticate.
But when clients calls the request, he receives '401' and no other error/exception message other than 401
I want to know how and where is the authentication happening in AEM.?
And I where can I see complete HTTP request that the client is sending to AEM? Any specific log file in AEM dispatcher? Any logger in AEM instance?( Since it is authentication error client request does not go to servlet to log request details)
Any leads on this would really help. Thank you
Views
Replies
Total Likes
Hi,
If you are using basic authentication you should append the header as below:
Authorization: "Basic" + "base64_encoded_credentials"
The encoding will vary per programming language, for example in java you could do something like this:
String password = "my_password";
String encodedCredentials = Base64.getEncoder().encodeToString(password.getBytes());
Hope this helps
Views
Replies
Total Likes
We are already passing the Bearer token in request. In same way as you mentioned. Still it throws 401
Views
Replies
Total Likes
httpdaccess, httpderror and aem request logs should give some idea where the problem lies.
Meanwhile could you share your Sling authentication service config details ?
Views
Replies
Total Likes
Views
Likes
Replies