browserid-provider 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
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
- > authentication_path
36
- > > Where to redirect users for login
37
- > > defaults to: "/users/sign_in" (Devise default)
38
- >
39
- > provision_path
40
- > > What HTTP path to deliver provisioning from
41
- > > defaults to: "/browserid/provision"
42
- > certify_path
43
- > > What HTTP path to deliver certifying from
44
- > > defaults to: "/browserid/certify"
45
- > whoami_path
46
- > > What HTTP path to serve user credentials at
47
- > > defaults to: "/browserid/whoami"
48
- >
49
- > whoami
50
- > > Name of the middleware to get the current user object from (:user must respond to :email method)
51
- > > This middleware will be called as follows: env['warden'].user.email
52
- > > defaults to: "warden"
53
- >
54
- > private_key_path
55
- > > Where is the BrowserID OpenSSL private key located
56
- > > defaults to: "config/browserid_provider.pem"
57
- >
58
- > The "/.well-known/browserid" path is required from the BrowserID spec and used here.
59
- >
60
- > browserid_url
61
- > > Which BrowserID server to use, ca be one of the following:
62
- > > * dev.diresworb.org for development (default)
63
- > > * diresworb.org for beta
64
- > > * browserid.org for production
65
- >
66
- > server_name
67
- > > The domain name we are providing BrowserID for (default to example.org)
68
- >
69
- > delegates
70
- > > An array of strings representing [authority delegates] [1]
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
- # * browserid.org for production
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
- "email"=> email,
85
- "pubkey" => params["pubkey"],
86
- "duration" => expiration,
87
- "hostname" => issuer(email)
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
 
@@ -1,3 +1,3 @@
1
1
  module BrowserID
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
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.3
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 00:00:00.000000000 Z
12
+ date: 2012-07-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json-jwt