Overview
Simple to use object whose methods are REST wrappers for a UAA in Cloud Foundry.
Login the Get Users Example
There must be a UAA instance running in a Cloud Foundry cloud. Then try this:
// Per your UAA set these varsvar uaaUrl = 'my-uaa-url';var clientId = 'my-client-id';var secret = 'my-client-secret'; var UaaClient = ;var uaa = uaaUrl; uaa;
Methods
Look at the integration tests for examples of use. Here briefly for reference:
- Constructor UaaClient(uaaUrl)
- login(client,secret)
- createClient(clientOptions,token)
- getClients(token) // token is access_token from login result
- deleteClient(clientId,token)
- getUsers(token)
- addUser(addUserOptions,token)
- removeUser(userId,token)
- updatePassword(userId,oldPassword,newPassword,token)
- refreshToken(refreshToken) // test TODO
- decodeAccessToken(accessToken) // test TODO
Testing
To run the tests do:
npm run test -- --UAA_URL=<your-uaa-url> --USERNAME=<your-username> --PASSWORD=<your-password>
License
Licensed under the Apache License, Version 2.0.
Forked from IBM-Bluemix/cf-nodejs-client which was in turn forked from prosociallearnEU/cf-nodejs-client.