Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModifiableRealmIdentity implementation example #210

Open
fabrii opened this issue Apr 17, 2024 · 2 comments
Open

ModifiableRealmIdentity implementation example #210

fabrii opened this issue Apr 17, 2024 · 2 comments

Comments

@fabrii
Copy link

fabrii commented Apr 17, 2024

Hello!

Can you please add an example implementation of ModifiableRealmIdentity, where the attributes can be updated when necessary?

Thanks

@Skyllarr
Copy link
Contributor

Hi @fabrii , take a look at self-service example, which updates the attributes and credentials of identity using the ModifiableRealmIdentity instance

@fabrii
Copy link
Author

fabrii commented Apr 30, 2024

Hi @Skyllarr.

I have an implementation based in that example. When invoking the modifiableIdentity.setAttributes(attribs); method, I get the following exception:

ELY01096: No such identity: org.wildfly.security.auth.server.RealmUnavailableException: ELY01096: No such identity
at [email protected]//org.wildfly.security.auth.server.ModifiableRealmIdentity$1.setAttributes(ModifiableRealmIdentity.java:124)

I found that the default "getRealmIdentityForUpdate" implementation returns ModifiableRealmIdentity.NON_EXISTENT. Do you have any implementation example of this method?

https://github.com/wildfly-security/wildfly-elytron/blob/2.x/auth/server/base/src/main/java/org/wildfly/security/auth/server/ModifiableSecurityRealm.java#L47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants