inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

스프링 시큐리티

5) 인증 및 인가 예외 처리 - AjaxLoginUrlAuthenticationEntryPoint, AjaxAccessDeniedHandler

URL 접근시 "Method Not Allowed" 오류 발생

5845

최민종

작성한 질문수 9

0

안녕하세요 원인을 찾아보려고했지만 결국 찾지못해서 댓글을 남기게되었습니다. 

 

사용자 계정의 권한이 있지만 POST으로 "/api/messages" 전송했을때 "error": "Method Not Allowed", 오류가 발생합니다. 

권한이 있는데 오류가 발생합니다.  어떤 부분에서 오류가 발생하는지 조언을 받을 수 있을까요..?

강의내용 : 인증 및 인가 예외 처리 - AjaxLoginUrlAuthenticationEntryPoint, AjaxAccessDeniedHandler

 

소스 : https://github.com/choiminjong/corespringsecurity

commits : 인증 및 인가 예외 처리 - AjaxLoginUrlAuthenticationEntryPoint, AjaxAccessDeni

java spring-boot Spring Security

답변 3

0

정수원

네 해결책을 찾아서 다행입니다.^^

 

0

최민종

찾았습니다..죄송합니다. GET으로 전송해야하는데 POST 으로 전송해서  "error": "Method Not Allowed", 오류가 발생했습니다....

0

최민종

계정은 user으로 시도했습니다. 

POST http://localhost:8080/api/messages

 

HTTP/1.1 405 

Allow: GET

X-Content-Type-Options: nosniff

X-XSS-Protection: 1; mode=block

Cache-Control: no-cache, no-store, max-age=0, must-revalidate

Pragma: no-cache

Expires: 0

X-Frame-Options: DENY

Content-Type: application/json

Transfer-Encoding: chunked

Date: Wed, 05 Jan 2022 03:29:48 GMT

Keep-Alive: timeout=60

Connection: keep-alive

 

{

  "timestamp": "2022-01-05T03:29:48.474+00:00",

  "status": 405,

  "error": "Method Not Allowed",

  "path": "/api/messages"

}

 

시큐리티 공부 버전 질문

0

181

1

[해결 방법] MethodSecurityConfig.customMethodSecurityMetadataSource() 호출하지 않는 이슈

0

187

1

AbstractSecurityInterceptor.class.beforeInvocation()를 2번 실행하는 경우

0

182

1

강의 코드가 왜이렇게 뒤죽박죽인가요...

0

257

1

메인 페이지로 접속해도 login url로 리다이렉트가 되지 않습니다..

0

241

1

파라미터값이 넘어가지 않습니다 ....

0

376

1

security filterChain 설정 질문이 있습니다.

0

334

1

소스 부분 질문 드립니다.

0

210

2

섹션4 7번 강의 문제가 있는거 같네요.

0

345

2

파일이 수시로 이름이 바껴있네요 ㄷㄷ

0

308

1

HttpSessionSecurityContextRepository를 사용안하는 문제

0

559

2

error , exception 이 잘 안됩니다.

0

286

2

thymeleaf tag 질문합니다.

0

198

2

버전업하면서 deprecated된 것들이 너무많아요

0

479

1

spring security 패치 관련

0

439

1

모바일을 사용할때 토큰말고 세션

0

856

2

DB 연동한 인가 부분에 대한 질문입니다!

0

265

1

Ajax방식도 똑같이 Session방식을 사용하는건가요?

0

309

1

Config 파일 생성 시 질문이 있습니다.

0

229

1

강사님 몇일동안 구글 검색만 100개 했는데도 이유를 모르겠습니다..

1

435

2

403 에러 뜹니다.

0

814

2

login_proc의 존재에 대한 간략한 설명입니다

0

277

1

top.html에 로그인 링크를 만들어서 로그인을 해봤습니다

0

288

2

안녕하세요. DB에 저장될 때 이해 안 가는 값이 있어서 질문드립니다!

0

192

1