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.
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
@WithJwtis 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.Jwtprincipal, as that is what is received for an OAuth2 resource server.