Skip to content
Ruby client APIs to access the Cloud Foundry User Account and Authentication service
Ruby
Find file
Latest commit a43e9e1 @paulcwarren paulcwarren committed with plfx Add capacity to limit management operations to a zone by subdomain
[#108255562] https://www.pivotaltracker.com/story/show/108255562

Signed-off-by: Jeremy Coffield <jcoffield@pivotal.io>
Failed to load latest commit information.
lib Add capacity to limit management operations to a zone by subdomain
spec Add capacity to limit management operations to a zone by subdomain
.gitignore
.travis.yml Added travis yml file
.yardopts v1.3.3: specify json & form charset utf-8
CHANGELOG.md Bump the version to 2.0.1 [#63771746]
Gemfile
LICENSE.TXT
NOTICE.TXT Update file headers to latest version
README.md Update README.md
Rakefile Update file headers to latest version
cf-uaa-lib.gemspec Update file headers to latest version

README.md

CloudFoundry UAA Gem

Build Status Gem Version

Client gem for interacting with the CloudFoundry UAA server

For documentation see: https://rubygems.org/gems/cf-uaa-lib

Install from rubygems

$ gem install cf-uaa-lib

Build from source

$ bundle install
$ gem build cf-uaa-lib.gemspec
$ gem install cf-uaa-lib<version>.gem

Use the gem

#!/usr/bin/env ruby
require 'uaa'
token_issuer = CF::UAA::TokenIssuer.new("https://uaa.cloudfoundry.com", "vmc")
puts token_issuer.prompts.inspect
token = token_issuer.implicit_grant_with_creds(username: "<your_username>", password: "<your_password>")
token_info = TokenCoder.decode(token.info["access_token"], nil, nil, false) #token signature not verified
puts token_info["user_name"]

Tests

Run the tests with rake:

$ bundle exec rake test

Run the tests and see a fancy coverage report:

$ bundle exec rake cov
Something went wrong with that request. Please try again.