annoirq
annoirq

Reputation: 865

HTTP Status 401 - Full authentication is required to access this resource

On some link I authorized with basic type: username,password and get session: "25C87AA2BFBFB3A1B70FECD9F4441738". Now I want manually get access to other resource with same session and put header: Cookie: JSESSIONID=25C87AA2BFBFB3A1B70FECD9F4441738

But error appears: HTTP Status 401 - Full authentication is required to access this resource

Upvotes: 2

Views: 32075

Answers (2)

Ashwini Kondalakadu
Ashwini Kondalakadu

Reputation: 79

Check if you have spring security related maven dependency in your pom.xml. Remove the dependency from pom.xml if not used. The issue will be resolved.

Upvotes: 0

seenukarthi
seenukarthi

Reputation: 8624

You have to add a HTTP header named Cookie and the value should be the JSESSIONID=<JSESSIONID VALUE>, As per you question the value should be JSESSIONID=25C87AA2BFBFB3A1B70FECD9F4441738

By this the server will check that the session already authenticated if authenticated it will allow to access the resource.

Update 1

According to Postman Docs there are some headers are restricted, unfortunately Cookie is one of them.

Update 2

As per the Postman Docs from version v0.9.6 sending restricted headers are possible by using Inspector extension.

Refrences

  1. How are cookies passed in the HTTP protocol?
  2. Under what conditions is a JSESSIONID created?

Upvotes: 3

Related Questions