Skip to content
Ruby client APIs to access the Cloud Foundry User Account and Authentication service
Ruby
Branch: master
Clone or download
jspawar and bruce-ricard Bump gem version in gemspec
Signed-off-by: Bruce Ricard <bricard@pivotal.io>
Latest commit e071d69 May 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Bump gem version in gemspec May 2, 2018
spec Raise CF::UAA::HTTPException when http timeout occurs [#152565859] May 2, 2018
.gitignore Bugfix: discover_uaa wouldn't return target with no links supplied Mar 15, 2013
.travis.yml Test against Ruby 2.2, 2.3, and 2.4 Jul 28, 2017
.yardopts v1.3.3: specify json & form charset utf-8 Dec 21, 2012
CHANGELOG.md Bump the version to 2.0.1 [#63771746] Jan 14, 2014
Gemfile Update file headers to latest version Aug 11, 2014
LICENSE
NOTICE Update NOTICE and README Mar 31, 2017
README.md Updated the readme file with correct command Jun 28, 2017
Rakefile Update file headers to latest version Aug 11, 2014
cf-uaa-lib.gemspec Bump bundler dependency in Gemspec Jul 10, 2017

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 = CF::UAA::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
You can’t perform that action at this time.