omniauth-open-edx 1.0.0 → 1.1.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/.github/workflows/validate.yml +32 -0
- data/.gitignore +1 -0
- data/.prettierignore +9 -0
- data/examples/sinatra/Gemfile +2 -0
- data/examples/sinatra/app.rb +10 -2
- data/lib/omniauth-open-edx/version.rb +1 -1
- data/omniauth-open-edx.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6958f4c987eebe5015422f90474856d4eb163ce989291bd1262b6c1514431c2
|
4
|
+
data.tar.gz: 21752ad436c7f4a27280cd00b75385ff89b95df82fe2345df6530fec0ee062bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18c004388b91ad328220e2ba685807e81171532cfdfbf1ef8d337379d707bced457d18bcd17982c04e71afb195388a3ae259d6264d23444268d5da11a59b6746
|
7
|
+
data.tar.gz: 3aa2ac93282db9d54efd66cabc489c4524bed6531ff169b4ec2707cb58d0763308ac8a31a26947a00bd7b747e66d6348b014d8e584f0ebfb34bb61f2e5eac90d
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: validate
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
style:
|
10
|
+
name: code style
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: 2.7
|
17
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
18
|
+
- run: bundle exec rbprettier --check .
|
19
|
+
|
20
|
+
test:
|
21
|
+
name: test
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby: ["2.4", "2.5", "2.6", "2.7"]
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v2
|
28
|
+
- uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
31
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
32
|
+
- run: bundle exec rake
|
data/.gitignore
CHANGED
data/.prettierignore
ADDED
data/examples/sinatra/Gemfile
CHANGED
data/examples/sinatra/app.rb
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
begin
|
2
2
|
require "sinatra"
|
3
|
+
require "securerandom"
|
3
4
|
require "omniauth"
|
4
5
|
require "omniauth-open-edx"
|
5
6
|
rescue LoadError
|
6
7
|
require "rubygems"
|
8
|
+
require "securerandom"
|
7
9
|
require "sinatra"
|
8
10
|
require "omniauth"
|
9
11
|
require "omniauth-open-edx"
|
10
12
|
end
|
11
13
|
|
14
|
+
set sessions: true
|
15
|
+
set :session_secret, ENV.fetch("SESSION_SECRET") { SecureRandom.hex(64) }
|
16
|
+
|
12
17
|
use Rack::Session::Cookie
|
13
18
|
use OmniAuth::Builder do
|
14
19
|
provider :open_edx,
|
@@ -17,14 +22,17 @@ use OmniAuth::Builder do
|
|
17
22
|
{
|
18
23
|
scope: "profile email",
|
19
24
|
client_options: {
|
20
|
-
site: "https://courses.
|
25
|
+
site: "https://courses.michael-juniper.skillsnetwork.site"
|
21
26
|
}
|
22
27
|
}
|
23
28
|
end
|
24
29
|
|
25
30
|
get "/" do
|
26
31
|
<<-HTML
|
27
|
-
<
|
32
|
+
<form method='post' action='/auth/open_edx'>
|
33
|
+
<input type="hidden" name="authenticity_token" value='#{request.env["rack.session"]["csrf"]}'>
|
34
|
+
<button type='submit'>Sign in with Open edX</button>
|
35
|
+
</form>
|
28
36
|
HTML
|
29
37
|
end
|
30
38
|
|
data/omniauth-open-edx.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
31
|
spec.add_dependency "jwt", ">= 2.0"
|
32
|
-
spec.add_dependency "omniauth", [">= 1.9", "<
|
32
|
+
spec.add_dependency "omniauth", [">= 1.9", "< 3"]
|
33
33
|
spec.add_dependency "omniauth-oauth2", ">= 1.4"
|
34
34
|
|
35
35
|
spec.add_development_dependency "bundler", ">= 2.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-open-edx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Lin
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '1.9'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '3'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '1.9'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '3'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: omniauth-oauth2
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,7 +164,9 @@ extensions: []
|
|
164
164
|
extra_rdoc_files: []
|
165
165
|
files:
|
166
166
|
- ".editorconfig"
|
167
|
+
- ".github/workflows/validate.yml"
|
167
168
|
- ".gitignore"
|
169
|
+
- ".prettierignore"
|
168
170
|
- ".prettierrc.yml"
|
169
171
|
- ".rspec"
|
170
172
|
- ".rubocop.yml"
|