Re: CF UAA Refresh Token


Paul Bakare
 

This is an issue with authorization.

You have to use a user with the correct scope. Specifically, use a client
with a scope/authority of 'uaa.admin'

The easiest way is to use the 'app' client to generate a refresh token for
a user.

On Mon, Aug 24, 2015 at 7:16 PM, Keagan Mendoza <keagan.mendoza(a)intel.com>
wrote:

Hi,

I am searching for a way to get a refresh token and I haven't been able to
do so. I did not find any info on the way to refresh a token. I was looking
for some docs externally and found some examples and drafted this:

Using Node.js

refreshUserToken: function (req, res) {
var request = require('request');
var pems = require('intel-cacerts').list;
var options = {
uri: req.body.url,
ca: pems,
headers:{
'Authorization' : 'bearer ' + req.query.token
},
form:{
refresh_token: req.body.refresh_token,
client_id: 'cf',
grant_type: 'refresh_token'
}
};


This is the error I get:

{"error":"unauthorized","error_description":"An Authentication object was
not found in the SecurityContext"}


Thanks,

Keagan Mendoza

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.