Skip to content

feat: support JWTs for gRPC endpoints - #201

Merged
johanandren merged 4 commits into
grpc-endpointsfrom
jwts-grpc-endpoints
Feb 11, 2025
Merged

johanandren merged 4 commits into
grpc-endpointsfrom
jwts-grpc-endpoints

Conversation

@efgpinto

@efgpinto efgpinto commented Feb 7, 2025

Copy link
Copy Markdown
Contributor

public void shouldRaiseExceptionWhenAccessingJWT() {
var call = httpClient.GET("/missingjwt").addHeader("Authorization","Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6ImtleTEifQ.eyJpc3MiOiJteS1pc3N1ZXItMTIzIn0.7d3PJvLIFA22nVW9eNIMJhkR9m5oInTwrRuwtaNNzB8")
.responseBodyAs(String.class).invokeAsync().toCompletableFuture();
// from here down, JWT validation tests for gRPC endpoints

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes above this line are only about formatting (from 4 spaces to 2) and replacing the hardcoded token with a generated one, for better readability and consistency.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, we don't have javafmt set up here? If not we should have, but unrelated to this PR

@efgpinto
efgpinto requested a review from johanandren February 7, 2025 14:57

@johanandren johanandren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johanandren

Copy link
Copy Markdown
Contributor

Merged main into grpc-endpoints, retriggered CI here

@johanandren

Copy link
Copy Markdown
Contributor

Ah, maybe the required upstream changes was not yet in runtime 1.3.4

@efgpinto

Copy link
Copy Markdown
Contributor Author

Yeah, I think I will run a snapshot release today.

@johanandren
johanandren merged commit d280391 into grpc-endpoints Feb 11, 2025
@johanandren
johanandren deleted the jwts-grpc-endpoints branch February 11, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants