stormpath-rails 2.5.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d0797044a0112e465739c5e300389df00665dec
4
- data.tar.gz: 172831a98c3790007f27a2b35d14da44b04e8a37
3
+ metadata.gz: ebee53dc4f55842adcb065bbddb0383e93d2bc5c
4
+ data.tar.gz: 7a5795af616685fce590251a0dcc629acb4dd313
5
5
  SHA512:
6
- metadata.gz: 834f464ef9822c655517d97095431c8482cf8e4ba88c3e317e6e36d25545c46dbe5ab1d3cf49c91e96540599d37cc3ed304631aeb9a7aafa1c8fde304681a0c3
7
- data.tar.gz: 22203d6038aa53ef45ec0ba458c81d2d031e93ec12d7ca4cd66834aec57e9ff0ef603f2857853ecf17dc1ac7902c298a9bcfe51152e2a3098f1f5cba79d3cd1b
6
+ metadata.gz: 9a6d8b681aaeff9abd022554028e40112fe8374f937078d0376f2f1d49a87da1291e748640b1a6ef685500f8c989f10ed6a5fb4080dc60702f9feac5d555f1e6
7
+ data.tar.gz: b6d88b5c183a76b71c6c6abdd9ef3f821ce701a48cb721c7dc9c848b875b987e33dafaa5e1a9bfe2e22ebcb0c0fe2d603e6e933411ae9ceeb4ee5512e2dfa89e
@@ -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
@@ -16,7 +16,7 @@ Add the stormpath-rails integration gem to your Gemfile.
16
16
  Stormpath is currently in beta so it is necessary to include the gem version:
17
17
 
18
18
  ```ruby
19
- gem 'stormpath-rails', '~> 2.5.1'
19
+ gem 'stormpath-rails', '~> 2.6.0'
20
20
  ```
21
21
 
22
22
  Bundle the Gemfile
@@ -3,7 +3,9 @@ module Stormpath
3
3
  module ForgotPassword
4
4
  class NewController < Stormpath::Rails::BaseController
5
5
  def call
6
- if organization_unresolved?
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,
@@ -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
@@ -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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Stormpath
3
3
  module Rails
4
- VERSION = '2.5.1'.freeze
4
+ VERSION = '2.6.0'.freeze
5
5
  end
6
6
  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.5.1
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-19 00:00:00.000000000 Z
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