liveBook · Manning

Bearer authentication

Bearer authentication is an authentication scheme in which presenting a bearer token is sufficient to use the access or authorization granted by that token.

How 5 Manning books explain it

ASP.NET Core in Action, 3e

A bearer token is a credential string that conveys authentication information to a service, typically relying on a signature to detect tampering rather than requiring possession-based proof.

How it is used
Authenticates API requests by letting clients present tokens containing user or app details.
How deep it goes
Defines token possession and follows JWT validation through middleware, then gives practical setup and testing steps.
Examples
Tests a minimal API with a dotnet user-jwts token sent through Swagger UI.
What you can do after
Apply it via AddJwtBearer and dotnet user-jwts to authenticate and test ASP.NET Core minimal API requests.

Read how ASP.NET Core in Action, 3e explains bearer authentication →

Building Web APIs with ASP.NET Core

Token-based authentication verifies a caller by requiring a token that represents the caller's authenticated identity or claims.

How it is used
Enables authenticated requests to protected board-game API endpoints without repeating login for every request.
How deep it goes
Walks through Swagger bearer configuration and response-based verification, then shows token forwarding to a role-protected gRPC method.
Examples
Tests a protected endpoint for 401 and 200 responses and forwards a token for a Moderator-only board-game update.
What you can do after
Apply it via SwaggerUI to send a login-issued JWT, verify protected access, and recognize when a role check is also required.

Read how Building Web APIs with ASP.NET Core explains bearer authentication →

Spring in Action, Sixth Edition

An access token presented in an HTTP Authorization header using the Bearer authentication scheme.

How it is used
Carries OAuth 2 access tokens from a Spring client to protected REST API endpoints.
How deep it goes
Traces header construction, request interception, request scope, and SecurityContext-based token lookup.
Examples
Demonstrates a RestIngredientService calling Taco Cloud API endpoints with writeIngredients authorization.
What you can do after
Apply it via Spring Security and RestTemplate to send authorized API requests.

Read how Spring in Action, Sixth Edition explains bearer authentication →

.NET in Action, Second Edition

Bearer authentication is an HTTP authentication method in which possession of a bearer token grants access to a protected resource.

How it is used
Uses bearer tokens to authenticate API callers before authorization policies restrict catalog operations.
How deep it goes
Inspects the Authorization header and JWT structure, then configures policy-based access using authenticated users and claims.
Examples
Uses Swagger UI to inspect a JWT and distinguishes authenticated-user reads from mutations reserved for one identity.
What you can do after
Apply bearer authentication through Swagger UI and configure ASP.NET authorization policies for authenticated users and a claim-matched identity.

Read how .NET in Action, Second Edition explains bearer authentication →

Secure APIs

A bearer token is an access credential whose possession is sufficient to present it for authorization without proving possession of a separate key.

How it is used
Documents authenticated API endpoints by defining and applying bearer-token security in OpenAPI.
How deep it goes
Defines the scheme fields and global or per-operation application, but does not explain token issuance or validation internals.
Examples
Uses an OpenAPI JWTBearer YAML definition and protected or public endpoint configuration.
What you can do after
Configure bearer-token authentication and its scope in an OpenAPI specification.

Read how Secure APIs explains bearer authentication →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.