SPRING CONCEPTS

Bearer token

Spring Concepts / Bearer token

A bearer token grants the access allowed to whoever possesses it.

Understand the idea

The client sends the token in the Authorization header. The server validates it before accepting the request. A copied valid token may be usable until expiration, so avoid placing it in URLs, logs, or public examples.

A concrete example

Authorization: Bearer eyJ...

In the application

React stores the access token in memory and adds this header through the api helper. Postman uses its Bearer Token authorization setting.

In Postman’s token field, paste the token only. When constructing a header manually, include the Bearer prefix and one space.

Related concepts

Read the official documentation ↗
Java 21 · Spring Boot 4.1.1 · Edupoly