You are on page 1of 21

Nội Dung

Author: Nguyễn Văn Tuyên


Email: nguyenvantuyen6789@gmail.com
Phone: 0888.335.333
Fb: facebook.com/nguyenvantuyen6789

1.1. Authen Account Inmemory


1.2. Authorization
2.1. Authen Account Db
3.1. Jwt
1.1. Authen Account Inmemory

Chọn Dependency
1.1. Authen Account Inmemory

Cho Dependency có Security


1.1. Authen Account Inmemory

Tài Khoản Mặc Định


Username:
user
Password:
149205b5-1bfd-4dbb-b057-0bdffbc03860
1.1. Authen Account Inmemory

Config custom username, password


1.1. Authen Account Inmemory

Config custom username, password


1.1. Authen Account Inmemory

Config custom username, password


1.1. Authen Account Inmemory

Config custom username, password


1.2. Authorization

t1/123456 là ADMIN vào được /admin/**


t2/123456 là USER không vào được /admin/**
1.2. Authorization

Dùng account t1/123456


1.2. Authorization

Dùng account t2/123456


2.1. Authen Account Db

AccountService
2.1. Authen Account Db

AccountServiceImpl
2.1. Authen Account Db

Database
2.1. Authen Account Db

Khai báo accountService trong ConfigSecurity


2.1. Authen Account Db

ConfigSecurity
2.1. Authen Account Db

ConfigSecurity
2.1. Authen Account Db

Dùng role có chữ ROLE: ROLE_USER, ROLE_ADMIN thì không cần “ROLE_” nữa
3.1. Jwt

Cho 3 thư viện vào


3.1. Jwt

Cho 3 thư viện vào


3.1. Jwt

Cho 3 thư viện vào

You might also like