Skip to content

Deprecated WithMockJwtAuth Annotation Concern #166

@danielshiplett

Description

@danielshiplett

This is more a question than a feature. But certainly not a bug.

I noticed on a recent update of spring-addons-oauth2-test to 7.2.0 that the WithMockJwtAuth annotation is deprecated?

Can you help me understand why? I see that @WithJwt is recommended. However, it is missing the ability to set claims and granted authorities directly. Instead, I must craft JSON or have a file with a full JWT available (I think). I much prefer to have concise code at the point of test, rather than having to go dig into another file to understand what my test is doing.

Is there an alternative? I need to have an annotation that creates the org.springframework.security.oauth2.jwt.Jwt principal, as that is what is received for an OAuth2 resource server.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestwontfixThis will not be worked on

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions