crowd-stefanwille 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -1
- data/Rakefile +4 -0
- data/crowd-stefanwille.gemspec +2 -2
- data/lib/crowd/version.rb +1 -1
- data/lib/crowd.rb +3 -3
- data/spec/crowd_spec.rb +6 -0
- metadata +4 -4
data/History.txt
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
|
2
|
-
== 0.5.
|
2
|
+
== 0.5.10 / 2010-07-26
|
3
3
|
|
4
|
+
* 0.5.10
|
5
|
+
* fixed bug in validation factor serialization
|
6
|
+
* 0.5.9
|
7
|
+
* improve documentation
|
8
|
+
* add required configuration for SSO
|
9
|
+
* add keys used to define user attributes in UserAttributeKeys
|
4
10
|
* 0.5.8 update by Stefan Wille <post@stefanwille.com>
|
5
11
|
* upgrade to crowd 2.0.5
|
6
12
|
* comment out specs for roles because of deprecation
|
data/Rakefile
CHANGED
@@ -23,6 +23,10 @@ task :wsdl2ruby do
|
|
23
23
|
puts "You will need to modify some 'require' statements in the generated sources manually to load files from the right location."
|
24
24
|
end
|
25
25
|
|
26
|
+
task :push => [:test, :build] do
|
27
|
+
system("gem push pkg/crowd-stefanwille-#{Crowd::Version::STRING}.gem")
|
28
|
+
end
|
29
|
+
|
26
30
|
begin
|
27
31
|
require 'jeweler'
|
28
32
|
Jeweler::Tasks.new do |gemspec|
|
data/crowd-stefanwille.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{crowd-stefanwille}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Stefan Wille", "Evgeny Zislis", "Jason Rimmer & Daniel Morrison"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-26}
|
13
13
|
s.description = %q{A client for Atlassian[http://www.atlassian.com] Crowd[http://www.atlassian.com/crowd] v2.0. Tested with Crowd 2.0.2 and 2.0.5.}
|
14
14
|
s.email = %q{post @nospam@ stefanwille.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/crowd/version.rb
CHANGED
data/lib/crowd.rb
CHANGED
@@ -31,7 +31,7 @@ class Crowd
|
|
31
31
|
@@crowd_app_name = nil
|
32
32
|
@@crowd_app_pword = nil
|
33
33
|
@@crowd_url = nil
|
34
|
-
@@crowd_session_tokenkey = '
|
34
|
+
@@crowd_session_tokenkey = 'session.tokenkey'
|
35
35
|
@@crowd_session_validationinterval = 0
|
36
36
|
@@crowd_session_lastvalidation = 'session.lastvalidation'
|
37
37
|
|
@@ -173,8 +173,7 @@ class Crowd
|
|
173
173
|
# Checks if the principal's current token is still valid.
|
174
174
|
def self.is_valid_principal_token?(principal_token, validation_factors = {})
|
175
175
|
response = authenticated_connection do
|
176
|
-
aovf =
|
177
|
-
validation_factors.each { |name,value| aovf << ValidationFactor.new(name, value)}
|
176
|
+
aovf = helper_validation_factors(validation_factors)
|
178
177
|
arg = IsValidPrincipalToken.new(@@application_token, principal_token, aovf)
|
179
178
|
server.isValidPrincipalToken(arg)
|
180
179
|
end
|
@@ -614,6 +613,7 @@ class Crowd
|
|
614
613
|
def self.helper_validation_factors(validation_factors = {})
|
615
614
|
aovf = ArrayOfValidationFactor.new
|
616
615
|
validation_factors.each { |name,value| aovf << ValidationFactor.new(name, value)}
|
616
|
+
aovf
|
617
617
|
end
|
618
618
|
|
619
619
|
# Has the application been authenticated?
|
data/spec/crowd_spec.rb
CHANGED
@@ -97,6 +97,12 @@ describe Crowd do
|
|
97
97
|
Crowd.is_valid_principal_token?(token).should be_true
|
98
98
|
end
|
99
99
|
|
100
|
+
it "should use validation factors to create the token" do
|
101
|
+
token1 = Crowd.authenticate_principal('unittest','unittest')
|
102
|
+
token2 = Crowd.authenticate_principal('unittest','unittest', { 'USER_AGENT' => 'Mozilla', 'REMOTE_ADDRESS' => '127.0.0.1', 'NAME' => 'soaptest' })
|
103
|
+
token1.should_not eql token2
|
104
|
+
end
|
105
|
+
|
100
106
|
it "should validate principal token with valid token" do
|
101
107
|
token = Crowd.authenticate_principal('unittest','unittest')
|
102
108
|
Crowd.is_valid_principal_token?(token).should be_true
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowd-stefanwille
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 10
|
10
|
+
version: 0.5.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stefan Wille
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-07-
|
20
|
+
date: 2010-07-26 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|