Looking at the documentation you need to POST to /oauth/access_token
POST /myApp/oauth/access_token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token&refresh_token=eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00ifQ....
That example doesn't send the BEARER token with the request, but with grails 4.0.5 and spring-security-rest-3.0.1, when I try to refresh the token, the request gets denied unless I include the current bearer token.
If the current bearer token is expired, the refresh message gets rejected for trying to use an expired token.
I'm using the following filterChain (straight from the docs)
// stateless chain
[
pattern: '/**',
filters: 'JOINED_FILTERS,-anonymousAuthenticationFilter,-exceptionTranslationFilter,-authenticationProcessingFilter,-securityContextPersistenceFilter,-rememberMeAuthenticationFilter'
],
There are some other entries in the docs about setting up ANONYMOUS_ACCESS, but that ends up creating a session, and causes some other weirdness I can't quite figure out yet.
Is there some other configuration to make the "/oauth/access_token" endpoint work like the "/api/login" request?