lockie 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9952a555d5390e0d3afa8a26bddab8aa1107d761d31db543ab52c09b344ce1ba
4
- data.tar.gz: ac4384cb0a1dee463cabff6e334e9eb9ea3266c2bfecfd6ea90430a7fb4af8fc
3
+ metadata.gz: 22ae4d1b474ec718051cb4f700b2ecd90feeb431f8498bc918b67e106247e465
4
+ data.tar.gz: 5310ec0700e7bf56cca68ff5289691629ba40a95255e57d1fe7a4877672de4f4
5
5
  SHA512:
6
- metadata.gz: fca45221ce6b5b2303a7cb9d0884f2298c11214aecc99c16b8fe418105f180fca094136e46edd33c4c940e4e062b037af3f608c607e9845fdde66cf1c6957f33
7
- data.tar.gz: 833cc9dbffc754cf7fb0a0fb40c437a2a9dc81996289ffa1388855972a81882559f5386530cfe675608dcea34574ff4104b06f437f069bf8a7afff1f12cf8752
6
+ metadata.gz: 56d6a3c7f3434e264b8b82f8ce3e925cba6e7a23e81681b704108bcb62db3cff9abc350076b045ec51594484dfab0560b4f3476160a95fce01b2c87ae613bdc8
7
+ data.tar.gz: bf7e8f48437243ba7b8ca3a352db762acd47ae720041a46b89cebc5d12476ae61b5457e77d4c8ba83a5de9eb5320db3bc9d8715ec92db3e27b162b4d7ebbc691
@@ -33,10 +33,14 @@ module Lockie
33
33
  def html_response
34
34
  flash[type] = message if message
35
35
  self.status = 302
36
- callback_url = request.base_url + request.original_fullpath
37
- uri = URI(Lockie.config.unauthenticated_path)
38
- uri.query = (uri.query.to_s.split("&") << "callback_url=#{ callback_url }").join("&")
39
- redirect_to uri.to_s
36
+ if Lockie.config.callback_url
37
+ callback_url = request.base_url + request.original_fullpath
38
+ uri = URI(Lockie.config.unauthenticated_path)
39
+ uri.query = (uri.query.to_s.split("&") << "callback_url=#{ callback_url }").join("&")
40
+ redirect_to uri.to_s
41
+ else
42
+ redirect_to Lockie.config.unauthenticated_path
43
+ end
40
44
  end
41
45
 
42
46
  def message
@@ -1,3 +1,3 @@
1
1
  module Lockie
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
data/lib/lockie.rb CHANGED
@@ -18,6 +18,7 @@ module Lockie
18
18
  attr_accessor :jwt_secret
19
19
  attr_accessor :hash_algorithm
20
20
  attr_accessor :serialize_session
21
+ attr_accessor :callback_url
21
22
 
22
23
  def initialize
23
24
  @model_name = "User"
@@ -25,6 +26,7 @@ module Lockie
25
26
  @default_strategies = [:email_password, :jwt]
26
27
  @hash_algorithm = "HS256"
27
28
  @serialize_session = true
29
+ @callback_url = true
28
30
  end
29
31
  end
30
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melvin Sembrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-08 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails