Skip to content

@TestSecurity/@JwtSecurity and SecurityIdentityAugmentor #30411

Answered by sberyozkin
michelkaeser asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @michelkaeser Right, I believe SecurityIdentityAugmentor were not wired in the original TestSecurity design because they can, quite typically, involve either remote HTTP calls or DB calls, which will conflict with the TestSecurity 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 with TestSecurity/JwtSecurity you can't get Principal correctly implementing all Principal methods ? In the latter case we can try to tweak things, otherwise registering a custom TestSecurityIdentityAugmentor would indeed be required - please try it and see if it h…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@michelkaeser
Comment options

@sberyozkin
Comment options

@entertainyou
Comment options

@sberyozkin
Comment options

Answer selected by michelkaeser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants