Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# spring security openapi-spec demo
The code was first generated from

And then we made the following changes
#### 1. Add spring-security-spring-boot-starter to pom
Pulled in newer versions of spring libs
```xml

org.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