2

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

annoirq
  • 825
  • 5
  • 18
  • 30

2 Answers2

3

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?
Community
  • 1
  • 1
seenukarthi
  • 8,241
  • 10
  • 47
  • 68
  • What technology you are using in the client side? – seenukarthi Aug 11 '15 at 10:35
  • I try to send request with programm Postman https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop – annoirq Aug 11 '15 at 10:38
  • @KarthikeyanVaithilingam - Hi Karthik, can you please help me on this . I really need help urgently as I am stuck with this since past 4 days. Thanks in advance!! https://stackoverflow.com/questions/53090739/spring-boot-jwt-security-full-authentication-is-required – SK. Nov 01 '18 at 12:50
0

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.