omniauth-edlink 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +10 -0
- data/README.md +6 -0
- data/lib/omniauth/edlink/version.rb +1 -1
- data/lib/omniauth/strategies/edlink.rb +10 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c03f09095c79e90de774f936dca9d726269445970cf96f090441a69ad25074da
|
4
|
+
data.tar.gz: dc21632edffeabefa2461bd6eaf5a85e3ef4418b45e52ef515689b90083c31ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 831df80a6be58b2ed2c924f3db08f5cf76756cd817d42c39c3063cddceb551d7b96c34c3cc01f0389f17a3f078b3bc499a2e2a7a8d713b3c598abd0aba42634e
|
7
|
+
data.tar.gz: 7fd816f3e7b426680add1369102edaefc35d056d4384a8534b8ab79b8d162af0b9333fcea2737b282df609928f3aa5b3166a33e67eb4dd04f37369d9f07f0752
|
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
.idea/
|
1
|
+
.idea/
|
2
|
+
omniauth-edlink-*.gem
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -37,6 +37,12 @@ Or, alternatively, if you use [Devise](https://github.com/plataformatec/devise),
|
|
37
37
|
'your-edlink-secret-key'
|
38
38
|
```
|
39
39
|
|
40
|
+
If for some reason you know the Edlink's integration id for a particular SSO request (e.g. from your application subdomain or from typed email address) and you want to take your users directly to their upstream SSO login page instead of generic Edlink login page, you can pass additional `integration_id` parameter to the redirect request, e.g.:
|
41
|
+
```ruby
|
42
|
+
redirect_to "/auth/edlink?integration_id=#{integration_id}"
|
43
|
+
```
|
44
|
+
This will redirect the user to the Edlink's SSO login page for the specified integration id.
|
45
|
+
|
40
46
|
# Contributing
|
41
47
|
1. Fork it
|
42
48
|
2. Create your feature branch (git checkout -b my-new-feature)
|
@@ -26,6 +26,12 @@ module OmniAuth
|
|
26
26
|
raw_info[options.uid_field.to_s]
|
27
27
|
end
|
28
28
|
|
29
|
+
def request_phase
|
30
|
+
integration_id = request.params['integration_id']
|
31
|
+
authorize_path = integration_id.present? ? integration_authorize_path(integration_id) : options.client_options.authorize_url
|
32
|
+
redirect client.connection.build_url(URI.join(options.client_options.site, authorize_path), authorize_params)
|
33
|
+
end
|
34
|
+
|
29
35
|
def authorize_params
|
30
36
|
super.tap do |params|
|
31
37
|
params[:scope] = [:email, :profile]
|
@@ -50,6 +56,10 @@ module OmniAuth
|
|
50
56
|
def callback_url
|
51
57
|
full_host + callback_path
|
52
58
|
end
|
59
|
+
|
60
|
+
def integration_authorize_path(integration_id)
|
61
|
+
"/api/authentication/integrations/#{integration_id}/launch"
|
62
|
+
end
|
53
63
|
end
|
54
64
|
end
|
55
65
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-edlink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Bednarz
|
8
8
|
- Tomasz Rosiek
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-07-
|
12
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth-oauth2
|
@@ -34,6 +34,7 @@ extensions: []
|
|
34
34
|
extra_rdoc_files: []
|
35
35
|
files:
|
36
36
|
- ".gitignore"
|
37
|
+
- CHANGELOG.md
|
37
38
|
- Gemfile
|
38
39
|
- Gemfile.lock
|
39
40
|
- LICENSE
|
@@ -46,7 +47,7 @@ homepage: https://github.com/u2i/omniauth-edlink
|
|
46
47
|
licenses:
|
47
48
|
- Apache-2.0
|
48
49
|
metadata: {}
|
49
|
-
post_install_message:
|
50
|
+
post_install_message:
|
50
51
|
rdoc_options: []
|
51
52
|
require_paths:
|
52
53
|
- lib
|
@@ -61,8 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
62
|
- !ruby/object:Gem::Version
|
62
63
|
version: '0'
|
63
64
|
requirements: []
|
64
|
-
rubygems_version: 3.
|
65
|
-
signing_key:
|
65
|
+
rubygems_version: 3.4.10
|
66
|
+
signing_key:
|
66
67
|
specification_version: 4
|
67
68
|
summary: The unofficial strategy for authenticating users using ed.link using OAuth2
|
68
69
|
provider
|