browserid-provider 0.5.3 → 0.5.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.
- data/README.md +42 -36
- data/lib/browserid-provider/config.rb +1 -1
- data/lib/browserid-provider/provider.rb +10 -5
- data/lib/browserid-provider/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
|
@@ -32,42 +32,48 @@ can easily be customized to fit any middleware function.
|
|
|
32
32
|
|
|
33
33
|
The available configuration options are the following:
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
35
|
+
* authentication_path
|
|
36
|
+
|
|
37
|
+
Where to redirect users for login
|
|
38
|
+
defaults to: "/users/sign_in" (Devise default)
|
|
39
|
+
* provision_path
|
|
40
|
+
|
|
41
|
+
What HTTP path to deliver provisioning from
|
|
42
|
+
defaults to: "/browserid/provision"
|
|
43
|
+
* certify_path
|
|
44
|
+
|
|
45
|
+
What HTTP path to deliver certifying from
|
|
46
|
+
defaults to: "/browserid/certify"
|
|
47
|
+
* whoami_path
|
|
48
|
+
|
|
49
|
+
What HTTP path to serve user credentials at
|
|
50
|
+
defaults to: "/browserid/whoami"
|
|
51
|
+
* jquery_path
|
|
52
|
+
|
|
53
|
+
What HTTP path JQuery is served at
|
|
54
|
+
defaults to: "/assets/jquery.js"
|
|
55
|
+
* whoami
|
|
56
|
+
|
|
57
|
+
Name of the middleware to get the current user object from (:user must respond to :email method)
|
|
58
|
+
This middleware will be called as follows: env['warden'].user.email
|
|
59
|
+
defaults to: "warden"
|
|
60
|
+
* private_key_path
|
|
61
|
+
|
|
62
|
+
Where is the BrowserID OpenSSL private key located
|
|
63
|
+
defaults to: "config/browserid_provider.pem"
|
|
64
|
+
* The "/.well-known/browserid" path is required from the BrowserID spec and used here.
|
|
65
|
+
* browserid_url
|
|
66
|
+
|
|
67
|
+
Which BrowserID server to use, ca be one of the following:
|
|
68
|
+
* login.dev.anosrep.org for development (default)
|
|
69
|
+
* login.anosrep.org for beta
|
|
70
|
+
* login.persona.org for production
|
|
71
|
+
* server_name
|
|
72
|
+
|
|
73
|
+
The domain name we are providing BrowserID for (default to example.org)
|
|
74
|
+
* delegates
|
|
75
|
+
|
|
76
|
+
An array of strings representing [authority delegates] [1]
|
|
71
77
|
|
|
72
78
|
[1]: https://wiki.mozilla.org/Identity/BrowserID#BrowserID_Delegated_Support_Document "Mozilla Identity Wiki"
|
|
73
79
|
|
|
@@ -24,7 +24,7 @@ module BrowserID
|
|
|
24
24
|
# browserid_url Which BrowserID server to use, ca be one of the following:
|
|
25
25
|
# * login.dev.anosrep.org for development (default)
|
|
26
26
|
# * login.anosrep.org for beta
|
|
27
|
-
# *
|
|
27
|
+
# * login.persona.org for production
|
|
28
28
|
#
|
|
29
29
|
# server_name The domain name we are providing BrowserID for (default to example.org)
|
|
30
30
|
#
|
|
@@ -79,14 +79,19 @@ module BrowserID
|
|
|
79
79
|
# "hostname" => issuer(email),
|
|
80
80
|
# "exp" => expiration,
|
|
81
81
|
# "public-key" => params["pubkey"],
|
|
82
|
+
# }
|
|
83
|
+
# issue = {
|
|
84
|
+
# "email"=> email,
|
|
85
|
+
# "pubkey" => params["pubkey"],
|
|
86
|
+
# "duration" => expiration,
|
|
87
|
+
# "hostname" => issuer(email)
|
|
82
88
|
# }
|
|
83
89
|
issue = {
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
90
|
+
"iss" => issuer(email),
|
|
91
|
+
"exp" => expiration,
|
|
92
|
+
"public-key" => JSON.parse(params["pubkey"]),
|
|
93
|
+
"principal" => { "email"=> email }
|
|
88
94
|
}
|
|
89
|
-
|
|
90
95
|
jwt = JSON::JWT.new(issue)
|
|
91
96
|
jws = jwt.sign(@identity.private_key, :RS256)
|
|
92
97
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: browserid-provider
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.4
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-07-
|
|
12
|
+
date: 2012-07-13 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: json-jwt
|