userdetailsservice

User Roles Spring Data Rest Spring security

夙愿已清 提交于 2020-05-29 12:29:34
问题 I have an error that I dont really understand. I didn't find any tutorial that explain why it doesn't work. I have this spring boot application using spring security. When I make this POST request : http://localhost:8181/roles body: { "name":"ROLE_USER" } it works fine. When I make this POST request : http://localhost:8181/users body: { "username":"user", "password":"pass", "roles":[ "http://localhost:8181/roles/1" ] } it works fine But when I make this GET request: http://localhost:8181

User Roles Spring Data Rest Spring security

限于喜欢 提交于 2020-05-29 12:26:33
问题 I have an error that I dont really understand. I didn't find any tutorial that explain why it doesn't work. I have this spring boot application using spring security. When I make this POST request : http://localhost:8181/roles body: { "name":"ROLE_USER" } it works fine. When I make this POST request : http://localhost:8181/users body: { "username":"user", "password":"pass", "roles":[ "http://localhost:8181/roles/1" ] } it works fine But when I make this GET request: http://localhost:8181

Custom UserDetailsService Not Being Called - Grails & Spring Security Core

徘徊边缘 提交于 2020-01-16 07:41:07
问题 I'm using Grails v2.4.2 with spring-security-rest, spring-security-core, and spring-security-ui plugins. I've written a custom UserDetailsService to make the username case-insensitive. All I am doing is simply trying to override UserDetails loadUserByUsername(String username, boolean loadRoles) throws UsernameNotFoundException My com.example.core.CaseInsensitiveUserDetailsService class is defined as: class CaseInsensitiveUserDetailsService extends GormUserDetailsService { /** * Make The

Spring Boot OAuth 2.0 UserDetails user not found

一笑奈何 提交于 2019-12-21 01:59:11
问题 I am new to Spring Boot, and I am trying to configure OAuth 2.0. The problem I am having at this moment is that I keep getting the following message when I attempt to request for an access token: { "error": "invalid_grant", "error_description": "Bad credentials" } The error message in the Spring Boot console says that the user cannot be found. : Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider : User 'stromero' not found : Returning cached

How to modify existing Spring MVC app to bypass spring security?

匆匆过客 提交于 2019-12-11 22:16:00
问题 I have done web developments using servlets few years ago without any frameworks, so I'm familiar with web services. Now my job requires me to modify 3 existing Spring MVC apps to combine 3 login screens into one. One app runs on Tomcat 5, two run on different versions of Tomcat 6. And the company decides to use .net to replace Java, so it hired a .net company to write an interface [ frame ] to have a single login screen, but the content inside the frame is still produced by the 3 old Java

Spring's UserDetailsService

我只是一个虾纸丫 提交于 2019-12-11 04:41:54
问题 I'm trying to configure Spring Security in my Spring Boot application to only allow certain users access certain URL's if they have a particular role i.e a user or admin role that I store when I create my user. I've looked at a couple of examples here that pretty much do what I'm looking for. I'm a bit confused about Spring's UserDetailsService interface and how I should pass a username from my user to the UserDetailsService when trying to access a URL like localhost:8080/addtour . At the

Spring Boot OAuth 2.0 UserDetails user not found

回眸只為那壹抹淺笑 提交于 2019-12-03 07:47:22
I am new to Spring Boot, and I am trying to configure OAuth 2.0. The problem I am having at this moment is that I keep getting the following message when I attempt to request for an access token: { "error": "invalid_grant", "error_description": "Bad credentials" } The error message in the Spring Boot console says that the user cannot be found. : Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider : User 'stromero' not found : Returning cached instance of singleton bean 'authenticationAuditListener' I have implemented a custom user that has