self-auth-rails 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/app/helpers/self_auth_rails/application_helper.rb +5 -5
- data/lib/self-auth-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d2821efde567ddb20996786b4d43f8b01cd9dc241d5776e39368d8683a3c722
|
4
|
+
data.tar.gz: 8803329056d4c9a9fbcb33840db6c1ff8c1a4b68957dee004793e6ce269e9b67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7a3cbcac197ccaaa7ca1602ef12ddf0ecf58cac7aecf0c8dc4aac436bff560cb9cfe25671582f4803a733cca2643159b345f6883d0253fd73646180eaac585
|
7
|
+
data.tar.gz: 00cc3778c63135789fd2b156151c5df62a219212711aaca2547204e67273acdf8b4c003340fea1e949c76f50a21a281f7978a1838949ac704daccb06238b7c4e
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Self Auth Rails Engine
|
2
|
+
|
3
|
+
[![CI](https://github.com/joinself/self-auth-rails-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/joinself/self-auth-rails-engine/actions/workflows/ci.yml)
|
2
4
|
|
3
5
|
self-auth-rails is rails engine to easily integrate [Self Authentication](https://docs.joinself.com/authentication/) on your authentication workflow.
|
4
6
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module SelfAuthRails
|
2
2
|
module ApplicationHelper
|
3
3
|
def authenticate_user!
|
4
|
-
current_url = request.base_url + request.path
|
4
|
+
current_url = URI(request.base_url + request.path).request_uri
|
5
5
|
|
6
6
|
uri = URI(main_app.root_url)
|
7
7
|
|
8
|
-
new_url = SelfAuthRails::Engine.routes.url_helpers.new_url(host: uri.host, port: uri.port)
|
9
|
-
create_url = SelfAuthRails::Engine.routes.url_helpers.create_url(host: uri.host, port: uri.port)
|
10
|
-
qr_url = SelfAuthRails::Engine.routes.url_helpers.qr_url(host: uri.host, port: uri.port)
|
11
|
-
dl_url = SelfAuthRails::Engine.routes.url_helpers.dl_url(host: uri.host, port: uri.port)
|
8
|
+
new_url = URI(SelfAuthRails::Engine.routes.url_helpers.new_url(host: uri.host, port: uri.port)).request_uri
|
9
|
+
create_url = URI(SelfAuthRails::Engine.routes.url_helpers.create_url(host: uri.host, port: uri.port)).request_uri
|
10
|
+
qr_url = URI(SelfAuthRails::Engine.routes.url_helpers.qr_url(host: uri.host, port: uri.port)).request_uri
|
11
|
+
dl_url = URI(SelfAuthRails::Engine.routes.url_helpers.dl_url(host: uri.host, port: uri.port)).request_uri
|
12
12
|
|
13
13
|
if [new_url, create_url, qr_url, dl_url].include? current_url
|
14
14
|
redirect_to root_url unless current_user.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: self-auth-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrià Cidre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|