TOKEN cannot be generated: org.radarcns.exception.TokenException: Forbidden: Could not verify the provided CSRF token because your session was not found. #59
I am on update-build branch and rolling my head on this for last 3 days.
I am trying to connect to actual ManagementPortal and hotstorage instances running on localhost.
I have the config files configured properly. When i start the application i keep getting
2017-12-29 13:50:53 UTC [.1] WARN - TOKEN cannot be generated: org.radarcns.exception.TokenException: Forbidden: Could not verify the provided CSRF token because your session was not found. [org.radarcns.listener.managementportal.TokenManagerListener:79]
2017-12-29 13:50:53 UTC [.1] INFO - Authentication filter initialized [org.radarcns.security.filter.AuthenticationFilter:37]
Specifically this happens when the TokenContextListener is trying to initiate the context with an access token using OAuth2Clientin TokenContextListener.
However CSRF is disabled on MP side AFAIK. It works when issue the same request using Postman or Curl, but not using OAuth2Client.
From my preliminary investigation, the only difference i see from curl response and response from OAuth2Client.java is the later has additional response header Set-Cookie: JSESSIONID=<some token>.
I am on
update-build
branch and rolling my head on this for last 3 days. I am trying to connect to actualManagementPortal
andhotstorage
instances running onlocalhost
. I have the config files configured properly. When i start the application i keep gettingSpecifically this happens when the TokenContextListener is trying to initiate the context with an access token using
OAuth2Client
inTokenContextListener
.and in
OAuth2Client
However CSRF is disabled on MP side AFAIK. It works when issue the same request using
Postman
orCurl
, but not using OAuth2Client.From my preliminary investigation, the only difference i see from curl response and response from OAuth2Client.java is the later has additional response header
Set-Cookie: JSESSIONID=<some token>
.