Skip to content

Document and test OAuth2 opaque token support - #421

Open
Adrastopoulos wants to merge 1 commit into
spring-projects:mainfrom
Adrastopoulos:gh-418
Open

Document and test OAuth2 opaque token support#421
Adrastopoulos wants to merge 1 commit into
spring-projects:mainfrom
Adrastopoulos:gh-418

Conversation

@Adrastopoulos

@Adrastopoulos Adrastopoulos commented Jul 29, 2026

Copy link
Copy Markdown

Tests for BearerTokenAuthenticationExtractor, HttpBasicAuthenticationExtractor and OAuth2ResourceServerConfigurer, including the jwt()-over-opaqueToken() precedence rule. These are the first tests in the security package.

An end-to-end test in the grpc-oauth2 sample authenticates an opaque token against a Spring Authorization Server by introspection, mirroring the existing JWT test.

Docs get worked jwt() and opaqueToken() examples, plus notes on introspector() / authenticationConverter() and the precedence rule.

Fixes gh-418

The GrpcSecurity OAuth2 resource server configurer has supported opaque
tokens since it was introduced, but the reference docs only mentioned
OAuth2 in passing and neither token format had test coverage. The
security package had no tests at all, so the extractors and the
jwt()-over-opaqueToken() precedence rule were unverified.

Add unit tests for the bearer and basic extractors and for the resource
server configurer, an end-to-end sample test that authenticates an
opaque token against a real authorization server by introspection, and
expand the server docs with worked jwt() and opaqueToken() examples.

Fixes spring-projectsgh-418

Signed-off-by: Gabriel Hall <gabriel.hall@cox.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opaque token support is undocumented and untested

1 participant