This repository was archived by the owner on Feb 28, 2025. It is now read-only.
-
-
Couldn't load subscription status.
- Fork 115
This repository was archived by the owner on Feb 28, 2025. It is now read-only.
302 Response - net::ERR_TOO_MANY_REDIRECTS #94
Copy link
Copy link
Closed
Labels
Description
I am unable to call the rest api successfully via AJAX using the plugin. I am receiving a 302 response which is causing a redirect loop.
I have tested non-authenticated, with the plugin removed and everything is work fine.
I am able to successfully call the rest api with curl:
curl -i -H "Accept: application/json" -H "Authorization:Bearer <TOKEN>" http://localhost:8084/app/api/exercise
I have the following configuration in place:
BuildConfig.groovy
compile ':spring-security-core:2.0-RC3'
compile ":spring-security-rest:1.4.0.RC5", {
excludes: 'spring-security-core'
}
Config.groovy
grails.plugin.springsecurity.rest.login.useJsonCredentials = true
grails.plugin.springsecurity.rest.token.storage.useGorm = true
grails.plugin.springsecurity.rest.token.storage.gorm.tokenDomainClassName = 'com.app.security.AuthenticationToken'
grails.plugin.springsecurity.filterChain.chainMap = [
'/api/**': 'JOINED_FILTERS,-exceptionTranslationFilter,-authenticationProcessingFilter,-securityContextPersistenceFilter', // Stateless chain
'/**': 'JOINED_FILTERS,-restTokenValidationFilter,-restExceptionTranslationFilter' // Traditional chain
]
I have ensured that the proper authentication token is being sent in the headers, here is a snippet from the request:
Request URL:http://localhost:8084/app/api/exercise/
Accept:application/json, text/plain, */*
Authorization:Bearer <TOKEN>
Is this a bug or is something configured incorrectly?
Thank you.