Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhomble/spring-security-openapi-demo
try out the new preauthorize feature in openapispec
https://github.com/nhomble/spring-security-openapi-demo
Last synced: about 1 month ago
JSON representation
try out the new preauthorize feature in openapispec
- Host: GitHub
- URL: https://github.com/nhomble/spring-security-openapi-demo
- Owner: nhomble
- Created: 2020-05-22T06:33:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-26T02:11:56.000Z (over 2 years ago)
- Last Synced: 2023-05-17T23:45:39.364Z (over 1 year ago)
- Language: Java
- Size: 58.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring security openapi-spec demo
The code was first generated fromAnd then we made the following changes
#### 1. Add spring-security-spring-boot-starter to pom
Pulled in newer versions of spring libs
```xmlorg.springframework.boot
spring-boot-starter-security
2.2.2.RELEASE```
#### 2. Map spring-security
In [here](src/main/java/io/github/nhomble/openapidemo/configuration/WebSecurityConfig.java)
##### Note: there is an in-memory user defined# Demo
1. refresh the swagger page
2. authenticate as nhomble:supersecret
3. try and fail the delete pet api, 403
4. try and succeed the get pet by id, 2xx