2021-07-24

0724 api 인증 처리하기

 Represents the token for an authentication request or for an authenticated principal once the request has been processed by the AuthenticationManager.authenticate(Authentication) method.

Once the request has been authenticated, the Authentication will usually be stored in a thread-local SecurityContext managed by the SecurityContextHolder by the authentication mechanism which is being used. 




api 로그인 페이지를 호출->

request로부터 email과 패스워드를 받아서 -

일치할경우 authentication Manager에게 토큰을 넘겨준다.

그러면 토큰이 security context에 저장된다.

post로 바디에 email과pw를 넣어서 보냈을 경우 -> 인증 OK. 
(다만 현재는 /루트로 가는 페이지가 없어서 404가 뜬다)



틀린패스워드를 넣을경우 -> 인증이 안되었다는 오류메시지를 확인할 수 있음.


댓글 없음:

댓글 쓰기

0328 fdisk, mkfs, mount, fstab

 1. 하드디스크를 붙인다. 2. fdisk -l로 하드디스크를 확인한다.  - interactiive한 커맨드모드 사용하여 (m) 붙인 하드디스크의 파티셔닝을 한다.  - 마지막에 w를 해야 실제로 반영이 된다.  3. mkfs를 하여 어떤 파일시스...