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

Error with Spring Security #111

Open
joramkimata opened this issue Sep 13, 2021 · 0 comments
Open

Error with Spring Security #111

joramkimata opened this issue Sep 13, 2021 · 0 comments

Comments

@joramkimata
Copy link

Hello there!

Am getting the following error

Exception while fetching data (/getAllUsers) : An Authentication object was not found in the SecurityContext

Here is my code

@GraphQLQuery(name = "getAllUsers")
    @PreAuthorize("hasRole('ROLE_USERS')")
    @PermissionMetaData(description = "Can view users", groupName = "UAA", moduleName = Constants.USERS_MANAGEMENT)
    public List<User> getAllUsers() {
        return this.userService.getAllUsers();
    }
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

1 participant