All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.mvc.security.jwt.basic-auth.jwt-basic-auth.md.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
# JWT basic auth

The basic auth just allows you to authenticate one user configured in `application.properties`. Before going to production, you probably want to update the user password (which is admin by default) using a BCrypt tool like [https://bcrypt-generator.com](https://bcrypt-generator.com).

## How it works

- Be sure to have selected and applied the `springdoc-jwt` module
- Access the swagger url: [http://localhost:{{serverPort}}/swagger-ui/index.html#](http://localhost:{{serverPort}}/swagger-ui/index.html#)
- Execute the `POST /api/authenticate` endpoint passing the username and password to retrieve the token
- Enter only the token after clicking on the `Authorize` button at the top right
- Execute the `GET /api/account` to test if the token works




© 2015 - 2024 Weber Informatics LLC | Privacy Policy