mod-auth-pubtkt-rb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mod_auth_pubtkt.rb +2 -13
- metadata +7 -4
data/lib/mod_auth_pubtkt.rb
CHANGED
@@ -47,7 +47,7 @@ module ModAuthPubTkt
|
|
47
47
|
|
48
48
|
key = open_key_file(key_path, key_type)
|
49
49
|
|
50
|
-
tkt = "uid=#{uid};validuntil=#{expires.to_i};cip=#{cip};tokens=#{tokens};udata=#{udata};grace_period
|
50
|
+
tkt = "uid=#{uid};validuntil=#{expires.to_i};cip=#{cip};tokens=#{tokens};udata=#{udata};grace_period=#{grace_period}";
|
51
51
|
|
52
52
|
sig = encrypt tkt, key
|
53
53
|
|
@@ -93,18 +93,7 @@ module ModAuthPubTkt
|
|
93
93
|
OpenSSL::PKey::RSA.new File.read(path)
|
94
94
|
end
|
95
95
|
end
|
96
|
-
|
97
|
-
|
98
|
-
# function adapted according to php: generates an IPv4 Internet network address
|
99
|
-
# from its Internet standard format (dotted string) representation.
|
100
|
-
def ip2long(ip)
|
101
|
-
long = 0
|
102
|
-
ip.split( /\./ ).reverse.each_with_index do |x, i|
|
103
|
-
long += x.to_i << ( i * 8 )
|
104
|
-
end
|
105
|
-
long
|
106
|
-
end
|
107
96
|
|
108
|
-
module_function :create_ticket, :encrypt, :verify, :open_key_file
|
97
|
+
module_function :create_ticket, :encrypt, :verify, :open_key_file
|
109
98
|
|
110
99
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mod-auth-pubtkt-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Matt Haynes
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-04 00:00:00 +01:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -29,7 +30,7 @@ extra_rdoc_files: []
|
|
29
30
|
files:
|
30
31
|
- lib/mod_auth_pubtkt.rb
|
31
32
|
- README.md
|
32
|
-
has_rdoc:
|
33
|
+
has_rdoc: true
|
33
34
|
homepage: http://github.com/matth/mod_auth_pubtkt_rb
|
34
35
|
licenses: []
|
35
36
|
|
@@ -43,6 +44,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
44
|
requirements:
|
44
45
|
- - ">="
|
45
46
|
- !ruby/object:Gem::Version
|
47
|
+
hash: 3
|
46
48
|
segments:
|
47
49
|
- 0
|
48
50
|
version: "0"
|
@@ -51,6 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
53
|
requirements:
|
52
54
|
- - ">="
|
53
55
|
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
54
57
|
segments:
|
55
58
|
- 0
|
56
59
|
version: "0"
|