stormpath-rails 2.5.1 → 2.6.0
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/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/app/controllers/stormpath/rails/forgot_password/new_controller.rb +10 -1
- data/docs/changelog.rst +7 -0
- data/lib/stormpath/rails.rb +1 -0
- data/lib/stormpath/rails/config/dynamic_configuration.rb +5 -0
- data/lib/stormpath/rails/config/id_site_verification.rb +39 -0
- data/lib/stormpath/rails/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebee53dc4f55842adcb065bbddb0383e93d2bc5c
|
4
|
+
data.tar.gz: 7a5795af616685fce590251a0dcc629acb4dd313
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a6d8b681aaeff9abd022554028e40112fe8374f937078d0376f2f1d49a87da1291e748640b1a6ef685500f8c989f10ed6a5fb4080dc60702f9feac5d555f1e6
|
7
|
+
data.tar.gz: b6d88b5c183a76b71c6c6abdd9ef3f821ce701a48cb721c7dc9c848b875b987e33dafaa5e1a9bfe2e22ebcb0c0fe2d603e6e933411ae9ceeb4ee5512e2dfa89e
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,20 @@
|
|
1
1
|
Stormpath Rails Changelog
|
2
2
|
============================
|
3
3
|
|
4
|
+
Version 2.6.0
|
5
|
+
-------------
|
6
|
+
Released on Jan 24, 2017
|
7
|
+
- Add ID site redirection for the /forgot endpoint
|
8
|
+
- Implement ID site verification - the gem will now throw an error if IDSite isn't properly configured
|
9
|
+
|
10
|
+
|
4
11
|
Version 2.5.1
|
5
12
|
-------------
|
6
13
|
Released on Jan 19, 2017
|
7
14
|
- Fix bug with callback uri not being set properly on IDSite logout
|
8
15
|
- Rewrite the IDSite authentication workflow
|
9
16
|
|
17
|
+
|
10
18
|
Version 2.5.0
|
11
19
|
-------------
|
12
20
|
Released on Jan 09, 2017
|
data/README.md
CHANGED
@@ -3,7 +3,9 @@ module Stormpath
|
|
3
3
|
module ForgotPassword
|
4
4
|
class NewController < Stormpath::Rails::BaseController
|
5
5
|
def call
|
6
|
-
if
|
6
|
+
if stormpath_config.web.id_site.enabled
|
7
|
+
redirect_to(stormpath_id_site_forgot_password_url)
|
8
|
+
elsif organization_unresolved?
|
7
9
|
redirect_to(parent_forgot_password_url)
|
8
10
|
else
|
9
11
|
respond_to do |format|
|
@@ -15,6 +17,13 @@ module Stormpath
|
|
15
17
|
|
16
18
|
private
|
17
19
|
|
20
|
+
def stormpath_id_site_forgot_password_url
|
21
|
+
Stormpath::Rails::Client.application.create_id_site_url(
|
22
|
+
callback_uri: id_site_result_url,
|
23
|
+
path: Stormpath::Rails.config.web.id_site.forgot_uri
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
18
27
|
def parent_forgot_password_url
|
19
28
|
UrlBuilder.create(
|
20
29
|
req,
|
data/docs/changelog.rst
CHANGED
@@ -6,6 +6,13 @@ Change Log
|
|
6
6
|
|
7
7
|
Gem changes until version 2.0.1, in descending order.
|
8
8
|
|
9
|
+
Version 2.6.0
|
10
|
+
-------------
|
11
|
+
Released on Jan 24, 2017
|
12
|
+
- Add ID site redirection for the /forgot endpoint
|
13
|
+
- Implement ID site verification - the gem will now throw an error if IDSite isn't properly configured
|
14
|
+
|
15
|
+
|
9
16
|
Version 2.5.1
|
10
17
|
-------------
|
11
18
|
Released on Jan 19, 2017
|
data/lib/stormpath/rails.rb
CHANGED
@@ -5,6 +5,7 @@ require 'stormpath/rails/config/application_resolution'
|
|
5
5
|
require 'stormpath/rails/config/account_store_verification'
|
6
6
|
require 'stormpath/rails/config/dynamic_configuration'
|
7
7
|
require 'stormpath/rails/config/multitenancy_verification'
|
8
|
+
require 'stormpath/rails/config/id_site_verification'
|
8
9
|
require 'stormpath/rails/config/social_login_verification'
|
9
10
|
require 'stormpath/rails/configuration'
|
10
11
|
require 'stormpath/rails/router'
|
@@ -18,6 +18,7 @@ module Stormpath
|
|
18
18
|
@static_config = static_config
|
19
19
|
proccess_account_store_verification
|
20
20
|
process_multitenancy_verification if static_config.stormpath.web.multi_tenancy.enabled
|
21
|
+
process_id_site_verification if static_config.stormpath.web.id_site.enabled
|
21
22
|
end
|
22
23
|
|
23
24
|
def app
|
@@ -74,6 +75,10 @@ module Stormpath
|
|
74
75
|
MultitenancyVerification.new(static_config.stormpath.web).call
|
75
76
|
end
|
76
77
|
|
78
|
+
def process_id_site_verification
|
79
|
+
IdSiteVerification.new(static_config.stormpath.web).call
|
80
|
+
end
|
81
|
+
|
77
82
|
def social_login_verification
|
78
83
|
@social_login_verification ||= SocialLoginVerification.new(app.href)
|
79
84
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Stormpath
|
2
|
+
module Rails
|
3
|
+
module Config
|
4
|
+
class IdSiteVerification
|
5
|
+
attr_reader :web_config
|
6
|
+
|
7
|
+
def initialize(web_config)
|
8
|
+
@web_config = web_config
|
9
|
+
end
|
10
|
+
|
11
|
+
def call
|
12
|
+
verify_id_site_set_correctly
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def verify_id_site_set_correctly
|
18
|
+
return if id_site_set_correctly?
|
19
|
+
raise(
|
20
|
+
InvalidConfiguration,
|
21
|
+
"ID site is not set correctly in the configuration file. Make sure the 'callback' is enabled and a uri is specified."
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def id_site_set_correctly?
|
26
|
+
id_site.enabled && callback.enabled
|
27
|
+
end
|
28
|
+
|
29
|
+
def id_site
|
30
|
+
web_config.id_site
|
31
|
+
end
|
32
|
+
|
33
|
+
def callback
|
34
|
+
web_config.callback
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stormpath-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nenad Nikolic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: stormpath-sdk
|
@@ -246,6 +246,7 @@ files:
|
|
246
246
|
- lib/stormpath/rails/config/account_store_verification.rb
|
247
247
|
- lib/stormpath/rails/config/application_resolution.rb
|
248
248
|
- lib/stormpath/rails/config/dynamic_configuration.rb
|
249
|
+
- lib/stormpath/rails/config/id_site_verification.rb
|
249
250
|
- lib/stormpath/rails/config/multitenancy_verification.rb
|
250
251
|
- lib/stormpath/rails/config/read_file.rb
|
251
252
|
- lib/stormpath/rails/config/social_login_verification.rb
|