The Spring Security REST Grails plugin allows you to use Spring Security for a stateless, token-based, RESTful authentication.
Questions tagged [spring-security-rest]
213 questions
3
votes
2 answers
Get current logged in user from Spring when SessionCreationPolicy.STATELESS is used
I want to implement this example using Keyclock server with Spring Security 5.
I'm going to use OAuth2.0 authentication with JWT token. I'm interested how I can get the current logged in user into the Rest Endpoint?
I have configured Spring Security…

Peter Penzov
- 1,126
- 134
- 430
- 808
3
votes
2 answers
Return custom Spring security message from Rest API
I want to create custom error message for Forbidden error. I tried this:
Spring Security Configuration:
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfig extends…

Peter Penzov
- 1,126
- 134
- 430
- 808
3
votes
3 answers
KeycloakRestTemplate with spring application
I have a spring client with spring rest api's which are protected with keycloak.
I am trying to call it using keycloakresttemplate from another client which is a pure java code with no security. I am getting the keycloak access token from java…

Sai Satyamayee
- 31
- 1
- 8
3
votes
1 answer
How to skip authorization for HAL browser in a spring boot application that make use of spring security
I wanted to allow HAL browser to skip authorization on a spring boot application. I am using Spring Security for authorization.
Here is the snap shot of the entries from build.gradle file
implementation…

Madhu Tomy
- 662
- 11
- 25
3
votes
0 answers
How to configure resource id in resource server using oauth2 security
I am trying to create Authorization server and resource server.
When tried to get access token from Authorization server its working and getting access token with following details.
{
"access_token": "5ffbc2d7-2a27-4f08-921f-f7de2410b5f5",
…

Joe
- 479
- 3
- 8
- 31
3
votes
1 answer
How to validate facebook authorization token and sign up user using Spring(java)
I am developing an app whose frontend is written using React.js and the backend REST API is written using the Spring framework. I wanted to add social logins to my website, so after days of googling and research, I understood that OAuth2 is the…

The Coder
- 3,447
- 7
- 46
- 81
3
votes
1 answer
There is no client authentication. Try adding an appropriate authentication filter exception spring oauth2
I am having my oauth client resttemplate configuration like following. I get the following exception. I researched and there are lots of areas which same exception but not able to resolve this. There is also existing issue with same exception here…

Saurabh Kumar
- 16,353
- 49
- 133
- 212
3
votes
1 answer
Spring Boot: disable security for status exception code
I have a Spring Boot application, with security. And I have removed the authentication for this "/login" url.
My Security Configuration
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
private final…

Kurt
- 190
- 1
- 10
3
votes
2 answers
Grails - grails-spring-security-rest - Impossible to load jwt secret from application.yml
I am using the application.yml file to load runtime configurations for the grails-spring-security-rest plugin.
grails:
profile: angularjs
codegen:
defaultPackage: telja
spring:
transactionManagement:
proxies:…

Clément B.
- 61
- 6
3
votes
2 answers
Application startup failed Grails 3.3.0 on adding Spring Security
I created a Grails REST API Project which runs fine otherwise.
I have added the following on build.gradle to add spring security rest dependecy to my build.gradle file
compile 'org.grails.plugins:spring-security-core:3.0.3'
compile…

Harshil Shah
- 83
- 1
- 8
3
votes
0 answers
How can I retrieve grails springsecurity rest jwt token?
I'm developing a Grails REST API to use with an Angular app. I used Spring Security Rest Plugin for authentication.
I'm implementing a reset password feature, and after the user resets their password, I want to retrieve the JWT token, in order to…

Carlos Alberto Schneider
- 4,585
- 2
- 13
- 9
3
votes
1 answer
Getting 403 error Bearer error="insufficient_scope" #3 with Grail plugin spring-security-rest
I am trying to make a basic example work of REST API with Spring security.
I am using the Grails plugin spring-security-rest:2.0.0.M2
I have tried to follow this excellent tutorial, and I run into an insufficient scope error.
I am defining a single…

themathmagician
- 467
- 5
- 16
3
votes
2 answers
How to customize Grails Spring Security REST login response HTTP code
I am using the Spring Security plugin and the Spring Security REST plugin for a Grails application and trying to implement a password change policy. On the front-end, our application is catching the 401 error when you're not logged in, but the case…

dudemonkey
- 1,091
- 5
- 15
- 26
2
votes
0 answers
In Spring security filter chain, why i don't see all the filters in the chain (more specifically UsernamePasswordAuthenticationFilter)?
From this Spring Security reference documentation:
5.2.1 -> Table 17.1. Standard Filter Aliases and Ordering
It seems 5.x added more filters to the chain then in 3.x. Or something else I should be aware, comments are welcome:
3.0.x -> The…

samshers
- 1
- 6
- 37
- 84
2
votes
1 answer
Can I mix both basic authentication and JWT token authentication to protect APIs of a single Spring Boot project?
I am pretty new in Spring Security and I am working on a Spring Boot project that uses Basic Authentication in order to protect some APIs. I am starting from an existing tutorial code (a Udemy course) trying to adapt it to my own use cases.
In this…

AndreaNobili
- 40,955
- 107
- 324
- 596