Skip to content

Ruby client APIs to access the Cloud Foundry User Account and Authentication service

License

Notifications You must be signed in to change notification settings

svkrieger/cf-uaa-lib

 
 

Repository files navigation

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

About

Ruby client APIs to access the Cloud Foundry User Account and Authentication service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%