Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sanv92/spring-rest-spring-security-examples
Spring REST + Spring Security Examples (in progress...)
https://github.com/sanv92/spring-rest-spring-security-examples
Last synced: 12 days ago
JSON representation
Spring REST + Spring Security Examples (in progress...)
- Host: GitHub
- URL: https://github.com/sanv92/spring-rest-spring-security-examples
- Owner: sanv92
- Created: 2019-07-25T11:10:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T17:01:41.000Z (5 months ago)
- Last Synced: 2024-12-22T05:30:39.495Z (about 1 month ago)
- Language: Java
- Homepage:
- Size: 127 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Security: security-rest1/.gitignore
Awesome Lists containing this project
README
# Spring Security Examples
## security-thymelaf
Basic Form Login Page with Remember Me---
## security-rest1
Basic Rest Api---
## security-rest2
Basic Rest Api with multiple configurations---
## security-rest3
Basic Rest Api with multiple configurations and JWT#### Login
```
GET /login
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJkb21haW4uY29tIiwiYXVkIjoic2VjdXJlLWFwcCIsInN1YiI6IlNhbmRlciIsImV4cCI6MTU2NzY0MjQ3Miwicm9sZXMiOlsiUk9MRV9VU0VSIiwiUk9MRV9BRE1JTiJdfQ.kVm0q2TlK-7IZyAyHhT2J93yGslBKIARWB7AdOYhCGWexmzNVkgAN2vJ5uwaRV7rBXHdvzLYKstwzaaoJV9O0g{
"username": "Sander",
"status": "ACTIVE",
"roles": [
"ROLE_USER",
"ROLE_ADMIN"
],
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJkb21haW4uY29tIiwiYXVkIjoic2VjdXJlLWFwcCIsInN1YiI6IlNhbmRlciIsImV4cCI6MTU2NzY0MjQ3Miwicm9sZXMiOlsiUk9MRV9VU0VSIiwiUk9MRV9BRE1JTiJdfQ.k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other endpoints for security testing
```
GET /admin/test1
GET /users/test1
POST /users/test7
```---