Authentication-Issue #1187
Unanswered
satya-devloper
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Earlier I was using micronaut 2.3.3 and the micronaut security jar which was used is 2.3.0
I was using the code snippet as
emitter.onSuccess( new Authentication() { @NonNull @Override public Map<String, Object> getAttributes() { return CollectionUtils.mapOf("roles", finalRolesList); } @Override public String getName() { return token; } })
and every authentication was working fine as expected
But after switching to latest micronuat 3.7.5 (micronaut security jar now used is 3.8.3)
It seems that getAttribute method is not called as when I printed log In that method , not able to see any log on terminal
but at the same time to debug more issue when I added getRoles in the new Authentication(), below log I can see on terminal
@Override public Collection<String> getRoles() { LOG.info(" ----- check value of getattribute----- " + CollectionUtils.mapOf("roles", finalRolesList)); return finalRolesList; }
Problem is that with this snippet now every time when I hit the api getting 403 for the latest micronaut(3.7.5) with this code
emitter.onSuccess( new Authentication() { @NonNull @Override public Map<String, Object> getAttributes() { return CollectionUtils.mapOf("roles", finalRolesList); } @Override public String getName() { return token; } })
Beta Was this translation helpful? Give feedback.
All reactions