Skip to content

CustomUserDetails is not in the allowlist #1221

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

Closed
Been24 opened this issue May 22, 2023 · 3 comments
Closed

CustomUserDetails is not in the allowlist #1221

Been24 opened this issue May 22, 2023 · 3 comments
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@Been24
Copy link

Been24 commented May 22, 2023

Describe the bug
When I user CustomUserDetails in Spring-Authorization-Server. JdbcOAuth2AuthorizationService$OAuth2AuthorizationRowMapper.parseMap()
throws IllegalArgumentException with Class CustomUserDetails is not in the allowlist. If you believe this class is safe to deserialize, please provide an explicit mapping using Jackson annotations or by providing a Mixin. If the serialization is only done by a trusted source, you can also enable default typing. See spring-projects/spring-security#4370 for details.

To Reproduce
use CustomUserDetails instead of InMemoryUserDetails in authorization-server

@Been24 Been24 added the type: bug A general bug label May 22, 2023
@jgrandja
Copy link
Collaborator

Closing this as a duplicate. See this comment for details.

@jgrandja jgrandja self-assigned this May 23, 2023
@jgrandja jgrandja added status: duplicate A duplicate of another issue and removed type: bug A general bug labels May 23, 2023
@sdack-cloud
Copy link

I have also encountered this issue, with so many questions about Jackson2. The official should provide an example of Jackson2 on how to deserialize using UserDetails
@jgrandja

@uniquejava
Copy link

Then how to use custom user details. I think for non-demo project, this is a must.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants