Bearer tokens are everywhere in modern APIs, and being able to isolate them in a capture saves real time when debugging authentication problems. The hasAuthorizationBearerFilter is the precise tool for the job: it matches only requests carrying a bearer scheme and leaves basic auth, custom signatures, and anonymous traffic alone.
Use hasAuthorizationBearerFilter when a rule should only run against requests using bearer token authentication, which is the dominant pattern for OAuth 2.0 and JWT based APIs. The filter is evaluated at request header time, so it can be combined with header rewrites, tagging, or replacement actions.
Typical scenarios:
Replace every bearer token with a known test value so you can reproduce a backend issue without leaking the real one in logs.
rules:
- filter:
typeKind: HasAuthorizationBearerFilter
actions:
- typeKind: AddAuthorizationBearerAction
token: test-token-for-debugging
Mark OAuth protected exchanges hitting a specific host so they stand out in the session viewer.
rules:
- filter:
typeKind: FilterCollection
operation: And
children:
- typeKind: HasAuthorizationBearerFilter
- typeKind: HostFilter
pattern: api.example.com
operation: Exact
actions:
- typeKind: ApplyTagAction
tag:
value: oauth-call
Useful in a sandboxed environment where bearer tokens should never reach production endpoints.
rules:
- filter:
typeKind: FilterCollection
operation: And
children:
- typeKind: HasAuthorizationBearerFilter
- typeKind: HostFilter
pattern: prod-api.example.com
operation: Exact
actions:
- typeKind: RejectWithStatusCodeAction
statusCode: 403
Select exchanges having bearer token in authorization.
Evaluation scope defines the timing where this filter will be applied.
requestHeaderReceivedFromClient This scope occurs the moment fluxzy parsed the request header receiveid from client
hasAuthorizationBearerFilter
This filter has no specific characteristic
The following table describes the customizable properties available for this filter:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| inverted | boolean | Negate the filter result | false |
The following examples apply a comment to the filtered exchange
Select exchanges having bearer token in authorization.
rules:
- filter:
typeKind: HasAuthorizationBearerFilter
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
View definition of HasAuthorizationBearerFilter for .NET integration.
The following filters are related to this filter:
Fluxzy looks for the Authorization header with the Bearer scheme prefix, the standard form used by OAuth 2.0 and most JWT issuers.
No. Use hasAuthorizationFilter if you want to match any Authorization scheme regardless of type.
The filter only matches the presence of the bearer scheme. To decode and inspect the JWT payload, combine the filter with logging actions or use the Fluxzy desktop inspector.