Postman에서 세션 쿠키를 삭제하는 방법은 무엇입니까?
Postman에서 API를 테스트하고 있으며 로그 아웃을 시뮬레이션하는 데 문제가 있습니다.
세션 쿠키를 삭제하는 호출을 수행하면 나중에
세션 쿠키가 그대로 유지되고 인증이 필요한 경로에 계속 액세스 할 수 있습니다.
서버의 경로 처리기는 다음과 같습니다.
server.route({
method: 'DELETE',
path: '/sessions/_current',
handler: function(req, reply){
req.auth.session.clear();
reply({}).code(204);
}
});
이것은 Hapi가있는 Node.js이지만 중요하지 않습니다.
Postman의 모든 쿠키 또는 특정 쿠키를 수동으로 삭제 하는 방법이 있습니까?
크롬 브라우저에서 수동으로 삭제하면 Postman에서 쿠키가 제거됩니다.
크롬 브라우저에서 chrome://settings/cookies
쿠키를 찾아 삭제하십시오.
편집 : 아래 Max890 주석에 따라 (Google 크롬 버전 (버전 63)) 이것은 이제 chrome://settings/content/cookies
"모든 쿠키 및 사이트 데이터보기"로 이동합니다.
Postman 4.0.5에는 Chrome과 별도로 쿠키를 관리하는 보내기 버튼 아래에 쿠키 관리 라는 기능이 있습니다 .
@markus가 말했듯이 "쿠키 관리자"를 사용하고 쿠키를 삭제하십시오.
Postman에서 파괴 쿠키를 설정하는 방법을 배우려면 Postman Echo 서비스 https://docs.postman-echo.com/을 확인해야합니다.
해당 쿠키를 설정, 가져 오기 및 삭제하는 방법에 대한 완전한 설명을 찾을 수 있습니다.
확인 : https://docs.postman-echo.com/#3de3b135-b3cc-3a68-ba27-b6d373e03c8c
시도 해봐.
In the Native Postman app there is "Cookie manager", so that is not a problem at all,
But in the Postman extension for Chrome there is not
So the solution is just in the installing native Postman
Postman for Linux, Mac & Windows
Is the Postman Interceptor enabled? Toggling it will route all requests and responses through the Chrome browser.
Interceptor - https://www.getpostman.com/docs/capture Cookies documentation - http://blog.getpostman.com/index.php/2014/11/28/using-the-interceptor-to-read-and-write-cookies/
Note that this answer applies only to the standalone Postman UI and not the Postman app/add-on for Chrome.
How to clear the cache in Postman (so that you are required to log in again when requesting a token, for example):
- navigate to View: Show DevTools
- navigate to the Application tab, then the Clear Storage view in the left menu
- deselect all choices except Cache Storage, then click on ‘Clear site data’
- restart Postman
- you should now be prompted to log in again when requesting a new token
Have you tried Clear Cache extension? Give it a try. It clears app cache, downloads, file systems, form data, history, local storage, passwords and much more, available in the Options settings.
Update: try this answer https://superuser.com/a/232794
I'm not sure of a way to do this in Postman. I used to close the whole browser and reset the server in order to authenticate again. Never tested logout because it was an API service.
into Chrome, right click -> Inspect Element. Go to the tab active tracking of resources and if you have not already. Now the left hand sidebar thingy down until you see "Cookies", click below your domain name and to remove a cookie just right-click on it and "Delete"
You can use the Postman interceptor.That you can add into the chrome extension by this link:https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo
This helps you send requests which use browser cookies through the Postman app. It can also send headers which are normally restricted by Chrome but are critical for testing APIs.
And also you can enable by interceptor which is there beside the orange sync icon
여기에 제공된 답변 중 하나 인 우편 배달부 쿠키를 제거하기 위해 크롬 쿠키를 지우려고했습니다. 그러나 그것은 나를 위해 작동하지 않았습니다. 우편 배달부 버전을 확인한 결과 5.5.4가 이전 버전 인 것으로 나타났습니다. 그래서 방금 최신 버전 7.3.4로 Postman 업데이트를 시도했습니다. 쿨, 문제가 해결되었습니다!
참고 URL : https://stackoverflow.com/questions/28305273/how-to-delete-session-cookie-in-postman
'code' 카테고리의 다른 글
"패키지 개인"구성원 액세스는 기본 (수정 자 없음) 액세스와 동의어가 아닙니까? (0) | 2020.09.03 |
---|---|
Android WebView에서 전체 화면으로 HTML5 비디오 재생 (0) | 2020.09.03 |
Ajax 처리의 "잘못된 JSON 기본 요소" (0) | 2020.09.02 |
Node 및 Express 4를 사용한 기본 HTTP 인증 (0) | 2020.09.02 |
문자열을 ArrayList로 변환하는 방법은 무엇입니까? (0) | 2020.09.02 |