bearer token
A token that grants access to whoever presents it, sent as Authorization: Bearer <token>, without any further proof of identity.
A stolen bearer token works for anyone until it expires or is revoked.
In more detail
Protect it like cash: send it only over HTTPS, keep it out of addresses and logs, give it a short expiry and narrow scopes. It saves sending a password on every request, and the server still verifies its claims before authorising work.
Examples
On a runner, ACTIONS_ID_TOKEN_REQUEST_TOKEN is sent as a bearer token to request the identity token.Authorization: Bearer eyJhbGciOi... # as readable as Basic credentials over plain HTTPExercise: change wire.py to send JSON with a bearer token and confirm it is just as visibleRelated terms
- access token — A generated string that proves who you are to a service, used instead of a password and revocable on its own.
- Authorization header — The request header that carries a client’s credentials, such as Authorization: Bearer <token> or Authorization: Basic <encoded>.
- token expiry — The time after which a token must no longer be accepted, carried in a JSON Web Token as the exp claim.
- OAuth scope — A named permission a token carries, such as tasks:read or tasks:write, limiting what the token may be used for.
- JSON Web Token — A compact signed token made of three base64url parts separated by dots: a header, a payload of claims and a signature.
- id-token: write — The workflow permission that allows a job to request a GitHub OpenID Connect token.
- secret — Any value that grants access, such as a password, access token or private key, and must be kept out of code and version control.
- static token file — A CSV file of bearer tokens the API server accepts, set with --token-auth-file, which benchmarks say not to use.
- revocation — Cancelling a credential, session or key before its natural expiry so it stops working.
- TLS — The encryption that protects data travelling over a network, the S in HTTPS.
- Basic authentication — An HTTP authentication scheme that sends a user name and password in the Authorization header, joined with a colon and Base64-encoded.
- authentication — Establishing who a request represents, for example by checking a password, a session cookie or a signed token.
- replay attack — An attack where a captured valid message, such as a token or code, is sent again to repeat its effect.
- temporary security credentials — Cloud credentials that expire on their own after minutes or hours, issued when a role is assumed.
Taught in
- Connect An Agent To MCP — AI Engineering: LLM Apps, RAG & Agents
- Remote Servers And Trust — AI Engineering: LLM Apps, RAG & Agents
- Working With AI Coding Assistants — AI Engineering: LLM Apps, RAG & Agents
- Basic Auth, Tokens And Sessions — Modern API Architecture: REST, GraphQL & gRPC
- JSON Web Tokens — Modern API Architecture: REST, GraphQL & gRPC
- OAuth Two And OpenID Connect — Modern API Architecture: REST, GraphQL & gRPC
- Keyless Authentication: OIDC to the Cloud — Continuous Integration & Continuous Delivery Pipelines
- Security Landing Zones & Centralized Egress Inspection — Cloud Security & DevSecOps Engineering
- Zero-Trust Network Access & IdP Federation — Cloud Security & DevSecOps Engineering
- Securing the Kubernetes Control Plane & Node Components — Cloud Security & DevSecOps Engineering
- Data States: Security at Rest, in Transit, and in Use — Cybersecurity Fundamentals, GRC & Cryptography
- Authentication: JWTs and Claims — Modern .NET Core, C# & Enterprise Microservices
- Workload Identity — Application Security & Threat Modeling for Engineers
References
- RFC 6750: OAuth 2.0 Bearer Token Usage
- RFC 6750: OAuth 2.0 Bearer Token Usage
- RFC 6750: OAuth 2.0 bearer token usage
- Configure JWT bearer authentication in ASP.NET Core