-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject_structure.txt
24 lines (19 loc) · 1.19 KB
/
project_structure.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
security : Spring Security & Security Objects are implemented here.
jwt:
AuthEntryPointJwt : implements AuthenticationEntryPoint
AuthTokenFilter : extends OncePerRequestFilter
JwtUtils : provides methods for generating, parsing, validating JWT
services:
WebSecurityConfig : extends WebSecurityConfigurerAdapter
UserDetailsServiceImpl : implements UserDetailsService
UserDetailsImpl : implements UserDetails
controllers : handle signup/login requests & authorized requests.
AuthController : @PostMapping(‘/signin’), @PostMapping(‘/signup’)
TestController : @GetMapping(‘/api/test/all’), @GetMapping(‘/api/test/[role]’)
repository : has intefaces that extend Spring Data JPA JpaRepository to interact with PostgreSQL Database.
UserRepository : extends JpaRepository<User, Long>
RoleRepository : extends JpaRepository<Role, Long>
models : defines two main models for Authentication (User) & Authorization (Role). They have many-to-many relationship.
User : id, username, email, password, roles
Role : id, name
payload : defines classes for Request and Response objects