rm-wsse 0.0.3 → 0.0.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -34
- data/README.md +20 -6
- data/Rakefile +0 -5
- data/lib/rm-wsse/rm-wsse.rb +4 -1
- data/lib/rm-wsse/version.rb +1 -1
- data/rm-wsse.gemspec +0 -2
- metadata +1 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f41933e6aeb3f58b4a5d3772dcf894425f8219d
|
4
|
+
data.tar.gz: dd6392563fa37e64e5a56bea5f866fd439ecee9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35734d1a849e3ae96784c7263192dcd6b7efd1aee9976e37d3ff1142a387c3d03e989bff3990f7ea96a0d486b403b8cc6da946192b0e93847d49390fa8bec46d
|
7
|
+
data.tar.gz: 5880878ecfb22ca38719895f69745856b25f5463aa64252ea3c7c1fc170e2dffbefb0222e339d8d809097d379419589da03feb1e5e831acbfad715f86ef63abe
|
data/Gemfile.lock
CHANGED
@@ -1,36 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rm-wsse (0.0.
|
5
|
-
cocoapods
|
6
|
-
motion-cocoapods
|
4
|
+
rm-wsse (0.0.4)
|
7
5
|
rm-digest
|
8
6
|
|
9
7
|
GEM
|
10
8
|
remote: https://rubygems.org/
|
11
9
|
specs:
|
12
|
-
activesupport (3.2.13)
|
13
|
-
i18n (= 0.6.1)
|
14
|
-
multi_json (~> 1.0)
|
15
|
-
claide (0.3.2)
|
16
|
-
cocoapods (0.22.2)
|
17
|
-
activesupport (~> 3.2.13)
|
18
|
-
claide (~> 0.3.2)
|
19
|
-
cocoapods-core (= 0.22.2)
|
20
|
-
cocoapods-downloader (~> 0.1.1)
|
21
|
-
colored (~> 1.2)
|
22
|
-
escape (~> 0.0.4)
|
23
|
-
json (~> 1.8.0)
|
24
|
-
open4 (~> 1.3.0)
|
25
|
-
xcodeproj (~> 0.8.1)
|
26
|
-
cocoapods-core (0.22.2)
|
27
|
-
activesupport (~> 3.2.13)
|
28
|
-
json (~> 1.8.0)
|
29
|
-
nap (~> 0.5.1)
|
30
|
-
cocoapods-downloader (0.1.1)
|
31
10
|
coderay (1.0.9)
|
32
|
-
colored (1.2)
|
33
|
-
escape (0.0.4)
|
34
11
|
ffi (1.9.0)
|
35
12
|
formatador (0.2.4)
|
36
13
|
guard (1.8.1)
|
@@ -42,19 +19,12 @@ GEM
|
|
42
19
|
guard-motion (0.1.2)
|
43
20
|
guard (>= 1.1.0)
|
44
21
|
rake (>= 0.9)
|
45
|
-
i18n (0.6.1)
|
46
|
-
json (1.8.0)
|
47
22
|
listen (1.2.2)
|
48
23
|
rb-fsevent (>= 0.9.3)
|
49
24
|
rb-inotify (>= 0.9)
|
50
25
|
rb-kqueue (>= 0.2)
|
51
26
|
lumberjack (1.0.4)
|
52
27
|
method_source (0.8.1)
|
53
|
-
motion-cocoapods (1.3.5)
|
54
|
-
cocoapods (>= 0.17.0)
|
55
|
-
multi_json (1.7.7)
|
56
|
-
nap (0.5.1)
|
57
|
-
open4 (1.3.0)
|
58
28
|
pry (0.9.12.2)
|
59
29
|
coderay (~> 1.0.5)
|
60
30
|
method_source (~> 0.8)
|
@@ -68,9 +38,6 @@ GEM
|
|
68
38
|
rm-digest (0.0.2)
|
69
39
|
slop (3.4.5)
|
70
40
|
thor (0.18.1)
|
71
|
-
xcodeproj (0.8.1)
|
72
|
-
activesupport (~> 3.2.13)
|
73
|
-
colored (~> 1.2)
|
74
41
|
|
75
42
|
PLATFORMS
|
76
43
|
ruby
|
data/README.md
CHANGED
@@ -7,8 +7,6 @@ gem for RubyMotion, to create WSSE header string.
|
|
7
7
|
It depends:
|
8
8
|
|
9
9
|
- rm-digest
|
10
|
-
- motion-cocoapods
|
11
|
-
- Base64
|
12
10
|
|
13
11
|
## Usage
|
14
12
|
|
@@ -28,6 +26,9 @@ BW::HTTP.post('http://example.com/api', {
|
|
28
26
|
Add these lines to your application's Gemfile:
|
29
27
|
|
30
28
|
gem 'rm-wsse'
|
29
|
+
gem 'bubble-wrap'
|
30
|
+
|
31
|
+
If Gemfile does not exist, run ```bundle init``` then created it.
|
31
32
|
|
32
33
|
And then execute:
|
33
34
|
|
@@ -39,11 +40,24 @@ Or install it yourself as:
|
|
39
40
|
|
40
41
|
Then, also add these lines to your application's Rakefile:
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
require 'rm-wsse'
|
44
|
+
require 'bubble-wrap'
|
45
|
+
|
46
|
+
Your Rakefile looks like this:
|
47
|
+
|
48
|
+
```Ruby
|
49
|
+
# -*- coding: utf-8 -*-
|
50
|
+
$:.unshift("/Library/RubyMotion/lib")
|
51
|
+
require 'motion/project/template/ios'
|
52
|
+
require 'rm-wsse'
|
53
|
+
require 'bubble-wrap'
|
54
|
+
|
55
|
+
Motion::Project::App.setup do |app|
|
56
|
+
# Use `rake config' to see complete project settings.
|
57
|
+
app.name = 'Your App name'
|
58
|
+
end
|
59
|
+
```
|
45
60
|
|
46
|
-
This brings [Base64 library](https://github.com/ekscrypto/Base64) to your project.
|
47
61
|
|
48
62
|
## Copyright
|
49
63
|
|
data/Rakefile
CHANGED
@@ -5,13 +5,8 @@ require 'motion/project/template/ios'
|
|
5
5
|
|
6
6
|
require 'guard/motion'
|
7
7
|
require 'rm-digest'
|
8
|
-
require 'motion-cocoapods'
|
9
8
|
|
10
9
|
Motion::Project::App.setup do |app|
|
11
10
|
app.name = 'spec'
|
12
11
|
app.files += Dir.glob(File.join(app.project_dir, 'lib/rm-wsse/*.rb'))
|
13
|
-
|
14
|
-
app.pods do
|
15
|
-
pod 'Base64'
|
16
|
-
end
|
17
12
|
end
|
data/lib/rm-wsse/rm-wsse.rb
CHANGED
@@ -12,8 +12,11 @@ class RmWsse
|
|
12
12
|
created = formatter.stringFromDate(date)
|
13
13
|
nonce = RmDigest::SHA1.hexdigest(created + rnd.to_s)
|
14
14
|
digest = RmDigest::SHA1.digest(nonce + created + password)
|
15
|
+
|
16
|
+
nonce_base64 = [nonce].pack('m0')
|
17
|
+
digest_base64 = [digest].pack('m0')
|
15
18
|
|
16
|
-
"UsernameToken Username=\"#{user}\", PasswordDigest=\"#{
|
19
|
+
"UsernameToken Username=\"#{user}\", PasswordDigest=\"#{digest_base64}\", Nonce=\"#{nonce_base64}\", Created=\"#{created}\""
|
17
20
|
end
|
18
21
|
end
|
19
22
|
end
|
data/lib/rm-wsse/version.rb
CHANGED
data/rm-wsse.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rm-wsse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naoya Ito
|
@@ -52,34 +52,6 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: cocoapods
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - '>='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: motion-cocoapods
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
55
|
description: Creates WSSE authentication header
|
84
56
|
email:
|
85
57
|
- i.naoya@gmail.com
|