@TestSecurity/@JwtSecurity and SecurityIdentityAugmentor #30411
-
Hi The project is using Do I have to provide a custom Thanks for assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
/cc @sberyozkin (security) |
Beta Was this translation helpful? Give feedback.
-
Hi @michelkaeser Right, I believe Do you mean that in the endpoint code you need to cast |
Beta Was this translation helpful? Give feedback.
Hi @michelkaeser Right, I believe
SecurityIdentityAugmentor
were not wired in the originalTestSecurity
design because they can, quite typically, involve either remote HTTP calls or DB calls, which will conflict with theTestSecurity
guaranteeing one can test security without having to setup some external services/etc.Do you mean that in the endpoint code you need to cast
Principal
to your custom class ? Or is the problem that withTestSecurity
/JwtSecurity
you can't getPrincipal
correctly implementing all Principal methods ? In the latter case we can try to tweak things, otherwise registering a customTestSecurityIdentityAugmentor
would indeed be required - please try it and see if it h…