cf-uaac 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
38
38
  s.add_development_dependency "simplecov"
39
39
  s.add_development_dependency "simplecov-rcov"
40
40
  s.add_development_dependency "ci_reporter"
41
- s.add_runtime_dependency "cf-uaa-lib", ">= 1.3.3", "<= 1.3.3"
41
+ s.add_runtime_dependency "cf-uaa-lib", ">= 1.3.4", "<= 1.3.4"
42
42
  s.add_runtime_dependency "highline"
43
43
  s.add_runtime_dependency "eventmachine"
44
44
  s.add_runtime_dependency "launchy"
@@ -24,7 +24,7 @@ class TokenCatcher < Stub::Base
24
24
  server.logger.debug "processing grant for path #{request.path}"
25
25
  secret = server.info.delete(:client_secret)
26
26
  ti = TokenIssuer.new(Config.target, server.info.delete(:client_id), secret,
27
- Config.target_value(:token_target))
27
+ token_target: Config.target_value(:token_target))
28
28
  tkn = secret ? ti.authcode_grant(server.info.delete(:uri), data) :
29
29
  ti.implicit_grant(server.info.delete(:uri), data)
30
30
  server.info.update(Util.hash_keys!(tkn.info, :sym))
@@ -72,7 +72,7 @@ class TokenCli < CommonCli
72
72
  def issuer_request(client_id, secret = nil)
73
73
  update_target_info
74
74
  yield TokenIssuer.new(Config.target.to_s, client_id, secret,
75
- :token_target => Config.target_value(:token_endpoint))
75
+ token_target: Config.target_value(:token_endpoint))
76
76
  rescue Exception => e
77
77
  complain e
78
78
  end
@@ -156,7 +156,7 @@ class TokenCli < CommonCli
156
156
  sleep 5
157
157
  print "."
158
158
  end
159
- Config.context = TokenCoder.decode(catcher.info[:access_token], verify: false)[:user_name]
159
+ Config.context = TokenCoder.decode(catcher.info[:access_token], verify: false)["user_name"]
160
160
  Config.add_opts catcher.info
161
161
  say_success secret ? "authorization code" : "implicit"
162
162
  return unless opts[:vmc]
@@ -14,6 +14,6 @@
14
14
  # Cloud Foundry namespace
15
15
  module CF
16
16
  module UAA
17
- CLI_VERSION = "1.3.3"
17
+ CLI_VERSION = "1.3.4"
18
18
  end
19
19
  end
@@ -32,7 +32,7 @@ class StubUAAConn < Stub::Base
32
32
 
33
33
  def valid_token(required_scope)
34
34
  return nil unless (ah = request.headers["authorization"]) && (ah = ah.split(' '))[0] =~ /^bearer$/i
35
- contents = TokenCoder.decode(ah[1])
35
+ contents = TokenCoder.decode(ah[1], accept_algorithms: "none")
36
36
  contents["scope"], required_scope = Util.arglist(contents["scope"]), Util.arglist(required_scope)
37
37
  return contents if required_scope.nil? || !(required_scope & contents["scope"]).empty?
38
38
  reply_in_kind(403, error: "insufficient_scope",
@@ -35,11 +35,6 @@ describe TokenCli do
35
35
 
36
36
  after :all do cleanup_target end
37
37
 
38
- it "gets the server signing key" do
39
- Cli.run("signing key -c #{@test_client} -s #{@test_secret}").should be
40
- Cli.output.string.should include 'alg:', 'value:'
41
- end
42
-
43
38
  it "logs in with implicit grant & posted credentials as a user" do
44
39
  Cli.run("token get #{@test_user} #{@test_pwd}").should be
45
40
  Cli.output.string.should include("Successfully fetched token")
@@ -102,6 +97,11 @@ describe TokenCli do
102
97
  end
103
98
  end
104
99
 
100
+ it "gets the server signing key" do
101
+ Cli.run("signing key -c #{@test_client} -s #{@test_secret}").should be
102
+ Cli.output.string.should include 'alg:', 'value:'
103
+ end
104
+
105
105
  it "uses the token endpoint given by the login server" do
106
106
  pending "only saml login server returns token endpoint" if ENV["UAA_CLIENT_TARGET"]
107
107
  @stub_uaa.info[:token_endpoint] = te = "#{@stub_uaa.url}/alternate"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-uaac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-12-21 00:00:00.000000000 Z
16
+ date: 2013-01-05 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
@@ -118,10 +118,10 @@ dependencies:
118
118
  requirements:
119
119
  - - ! '>='
120
120
  - !ruby/object:Gem::Version
121
- version: 1.3.3
121
+ version: 1.3.4
122
122
  - - <=
123
123
  - !ruby/object:Gem::Version
124
- version: 1.3.3
124
+ version: 1.3.4
125
125
  type: :runtime
126
126
  prerelease: false
127
127
  version_requirements: !ruby/object:Gem::Requirement
@@ -129,10 +129,10 @@ dependencies:
129
129
  requirements:
130
130
  - - ! '>='
131
131
  - !ruby/object:Gem::Version
132
- version: 1.3.3
132
+ version: 1.3.4
133
133
  - - <=
134
134
  - !ruby/object:Gem::Version
135
- version: 1.3.3
135
+ version: 1.3.4
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: highline
138
138
  requirement: !ruby/object:Gem::Requirement
@@ -282,7 +282,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
282
282
  version: '0'
283
283
  segments:
284
284
  - 0
285
- hash: 2333184341593208411
285
+ hash: 2590273810398717520
286
286
  required_rubygems_version: !ruby/object:Gem::Requirement
287
287
  none: false
288
288
  requirements:
@@ -291,10 +291,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
291
  version: '0'
292
292
  segments:
293
293
  - 0
294
- hash: 2333184341593208411
294
+ hash: 2590273810398717520
295
295
  requirements: []
296
296
  rubyforge_project: cf-uaac
297
- rubygems_version: 1.8.24
297
+ rubygems_version: 1.8.23
298
298
  signing_key:
299
299
  specification_version: 3
300
300
  summary: Command line interface for CloudFoundry UAA