Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Can\'t authenticate on author via Http POST from Java app


Level 5

I'm trying to authenticate a standalone java app that pulls content from the AEM author as JSON. In my local I can simply POST to

AEM_URL + "/j_security_check"

via the Apache HTTP Client, passing:

postParams.add(new BasicNameValuePair("j_username", username));postParams.add(new BasicNameValuePair("j_password", password));postParams.add(new BasicNameValuePair("j_validate", "true"));

and I get back the auth token cookie which I can then grab and use on my GET request to the secure resource.

However on our pre-prod author this fails, I get a 200 back but no cookie. Is this the correct method to authenticate a standalone java app, and if so am I missing something to get this working on our pre-prod author, which is hardened compared to our local dev environments so not sure if this is blocked somehow on security grounds.  

1 Reply


Level 10

I am looking for a code example that will help you. We have Java POST articles - but without authen requirements. In past - we had community ask how to turn off authentication because the Java app would only be used by internal ppl.