Questions tagged [spring-security-rest]

The Spring Security REST Grails plugin allows you to use Spring Security for a stateless, token-based, RESTful authentication.

213 questions
59
votes
17 answers

Spring Boot 2.0 disable default security

I want to use Spring Security for JWT authentication. But it comes with default authentication. I am trying to disable it, but the old approach of doing this - disabling it through application.properties - is deprecated in 2.0. This is what I…
16
votes
2 answers

Facebook login in JWT

I have developed token based spring security using JWT referring this project in git https://github.com/szerhusenBC/jwt-spring-security-demo. Now I need to get facebook login in my application. For social login, I found another web page…
User1230321
  • 1,435
  • 4
  • 23
  • 39
9
votes
2 answers

Spring boot security consider case insensitive username check for login

I'm developing a Spring boot web application. The problem is in the login scenario. Suppose I have a user registered by the username "Ali". This user can either login with username "Ali" or "ali". The code below represents my spring security config…
RezKesh
  • 2,861
  • 2
  • 24
  • 35
7
votes
2 answers

HTTP 403 forbidden error in spring boot security

Spring security configuration class @Configuration @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter{ @Autowired private UserDetailsService userDetailsService; @Bean public PasswordEncoder…
7
votes
1 answer

class Authority is not a domain class or GORM has not been initialized correctly or has already been shutdown

I'm working on a grails rest app. The grails version I'm using is 3.3.1. I'm using spring-security-rest for authorization. I've created the following classes using the s2-quickstart command. User Authority UserAuthority The app runs fine but…
7
votes
1 answer

springSecurityService.principal returns Null when deployed as a WAR in tomcat 8.5

Preamble I'm designing an API gateway for a Grails microservice federation. This issue seems related to a bunch of issues already filed in this repository but nothing provides a solution. Versions and Configurations Grails: 3.2.2 Tomcat: 8.5 Plugin…
Saqib Ahmed
  • 1,056
  • 14
  • 33
6
votes
0 answers

Mobile Native Social Sign Up using Spring Security OAuth 2.0 and JWT

I have implemented Password Grant for my Authentication Server using Spring Security OAuth 2.0 and JWT. I create the Server by extending the AuthorizationServerConfigurerAdapter. I am able to give the server a username/password and get back a JWT…
6
votes
1 answer

Spring security rest plugin: Authentication failed, No AuthenticationProvider found

I am trying to integrate spring security rest plugin version 1.4.1 in my grails app, but facing some issue, I am doing like that: Config.groovy setting: //login end point grails.plugin.springsecurity.rest.login.active=true …
ABC
  • 4,263
  • 10
  • 45
  • 72
5
votes
1 answer

Spring boot security - allowing user requests with expired JWT token

I have some users who are accessing some APIs with valid JWT token but because their tasks on their side take much more time than the token expire time, when they come to the API again, the JWT token expires already. They shouldn't refresh their…
5
votes
0 answers

How to validate bearer access token in spring boot using jwt public key

I have access token generated from websec using client id and secret. My project app.properties have jwt public key. I am developing rest api , call to Rest api will provide Bear token (generated one)that I wanted to validate using jwt public…
5
votes
2 answers

A component required a bean named '' that could not be found

I'm trying to build my first grails application using grails-spring-security-rest plugin following this post's instructions. However, when I try to run the application it gives me the following output: | Running application... 2017-05-07…
LZR
  • 948
  • 10
  • 28
4
votes
1 answer

Spring security - create 2 filter chains with specific matchers

I'm in the process of implementing ADFS support to an existing spring project. Since we already have our own JWT authentication, which we want to work in parallel to ADFS authentication, I want to implement a new filter chain that will handle only…
Itamar Kerbel
  • 2,508
  • 1
  • 22
  • 29
4
votes
2 answers

Spring Security user authentication against customers and employee

I am new to Spring Security. I have a Spring Boot application with two different types of entities. Customers and employees. In Employees I have normal employees, admins and super users. Since I am using JPA, each entity has its own repository. How…
zilcuanu
  • 3,451
  • 8
  • 52
  • 105
4
votes
2 answers

Grails REST security - Add user id to token

I want to add user id field to token returned from /api/login Currently it's: { "username": "user", "roles": [ "ROLE_USER" ], "token_type": "Bearer", "access_token": "eyJhbGciOiJIUzI1NiJ9.2uk2YoHsyd7bqUdtUYN19ef..", …
ziftech
  • 747
  • 1
  • 10
  • 22
4
votes
0 answers

Spring Boot OAuth2 with JDBC Using Custom UserDetailService

I am trying to secure my Spring Boot Rest API using OAuth2.0 with Spring security and want to store OAuth tokens (Access Token and Refresh Token) in JDBC database. For Username and Password validation i have created CustomUserDetailService. I am…
1
2 3
14 15