omniauth-idcat_mobil 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9691f8a5ce128b45dbd3cc8b48e979dd6a2e25d6d331b858a03cc46011f05aa2
4
+ data.tar.gz: cd7b6247e1a629290a7474a655f1611b82e439fc156bc8e4571fa43376dcc581
5
+ SHA512:
6
+ metadata.gz: 7e436a5c9f6c65dde4a01fdf73e298c86dd42c1b41fe0155d15559cc8f8a8a97eed6e5ee9c029636585b1888e881183b43ffaaa3f321a0ec8a73ad8869caee66
7
+ data.tar.gz: 05be1b35950d897ba8da644b973dbcf1652af4c4f3a64f5f123bced185a8433b2059ff5bedd956db69649760d4985037bb22d9bbec8dfe8ba76911cc333a3617
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.1
7
+ before_install: gem install bundler -v 1.16.4
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## next version:
4
+
5
+ ## Version 0.1.1 (PATCH)
6
+ - [REFACTOR] Remove one declaration of info email field which was setted twice. \#[3](https://github.com/gencat/omniauth-idcat_mobil/pull/3)
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at oliver.hv@coditramuntana.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in omniauth-idcat_mobil.gemspec
6
+ gemspec
7
+
8
+ group :test do
9
+ gem "rack", ">= 1.6.2"
10
+ gem "rack-test"
11
+ gem "rspec", "~> 3.0"
12
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,61 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omniauth-idcat_mobil (0.1.1)
5
+ omniauth (~> 1.5)
6
+ omniauth-oauth2 (>= 1.4.0, < 2.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ diff-lcs (1.3)
12
+ faraday (0.15.4)
13
+ multipart-post (>= 1.2, < 3)
14
+ hashie (3.5.7)
15
+ jwt (2.1.0)
16
+ multi_json (1.13.1)
17
+ multi_xml (0.6.0)
18
+ multipart-post (2.0.0)
19
+ oauth2 (1.4.1)
20
+ faraday (>= 0.8, < 0.16.0)
21
+ jwt (>= 1.0, < 3.0)
22
+ multi_json (~> 1.3)
23
+ multi_xml (~> 0.5)
24
+ rack (>= 1.2, < 3)
25
+ omniauth (1.8.1)
26
+ hashie (>= 3.4.6, < 3.6.0)
27
+ rack (>= 1.6.2, < 3)
28
+ omniauth-oauth2 (1.5.0)
29
+ oauth2 (~> 1.1)
30
+ omniauth (~> 1.2)
31
+ rack (2.0.6)
32
+ rack-test (1.1.0)
33
+ rack (>= 1.0, < 3)
34
+ rake (10.4.2)
35
+ rspec (3.8.0)
36
+ rspec-core (~> 3.8.0)
37
+ rspec-expectations (~> 3.8.0)
38
+ rspec-mocks (~> 3.8.0)
39
+ rspec-core (3.8.0)
40
+ rspec-support (~> 3.8.0)
41
+ rspec-expectations (3.8.2)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.8.0)
44
+ rspec-mocks (3.8.0)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.8.0)
47
+ rspec-support (3.8.0)
48
+
49
+ PLATFORMS
50
+ ruby
51
+
52
+ DEPENDENCIES
53
+ bundler (~> 1.16)
54
+ omniauth-idcat_mobil!
55
+ rack (>= 1.6.2)
56
+ rack-test
57
+ rake (~> 10.0)
58
+ rspec (~> 3.0)
59
+
60
+ BUNDLED WITH
61
+ 1.16.4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Generalitat de Catalunya - participa.gencat.cat
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1 @@
1
+ TODO
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Omniauth::IdcatMobil
2
+
3
+ User registration and login through IdCat mòbil, an authentication method that uses OAuth 2.0 protocol.
4
+ _IdCat mòbil_ is an identity validator from VÀLid (Validador d'Identitats del Consorci AOC).
5
+
6
+ Further information: https://web.gencat.cat/ca/tramits/com-tramitar-en-linia/identificacio-digital/id-cat-mobil
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'omniauth-idcat_mobil'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install omniauth-idcat_mobil
23
+
24
+ ## Usage
25
+
26
+ Users must be registered at _IdCat mòbil_. To do so, you can register online or offline, check how [here]( https://web.gencat.cat/ca/tramits/com-tramitar-en-linia/identificacio-digital/id-cat-mobil/#bloc2).
27
+
28
+ Next, tell OmniAuth about this strategy. In a Rails application using Devise you would create a file like config/initializers/omniauth_idcat_mobil.rb with this code:
29
+
30
+ ```ruby
31
+ Devise.setup do |config|
32
+ config.omniauth :idcat_mobil,
33
+ ENV["IDCAT_MOBIL_CLIENT_ID"],
34
+ ENV["IDCAT_MOBIL_CLIENT_SECRET"],
35
+ ENV["IDCAT_MOBIL_SITE_URL"],
36
+ scope: :autenticacio_usuari
37
+ end
38
+ ```
39
+
40
+ `omniauth-idcat_mobil` is a standard OAuth2 strategy. It is based on `omniauth-oauth2` that is just an `omniauth` extension. Thus, you can also integrate it using [`omniauth` integrating guide](https://github.com/omniauth/omniauth).
41
+
42
+ ## Incon assets
43
+ We're including _IdCat mòbil_ icons in lib/decidim/idcat_mobil for the joy of the developer. They can be used to complement the OAuth2 button or alike.
44
+
45
+ ## Development
46
+
47
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
48
+
49
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
50
+
51
+ ## Contributing
52
+
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/omniauth-idcat_mobil. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
54
+
55
+ ## License
56
+
57
+ The Department d'Exteriors of [Generalitat de Catalunya](http://gencat.cat) makes this gem available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
58
+
59
+ Authored by [CodiTramuntana](http://coditramuntana.com).
60
+
61
+ ## Code of Conduct
62
+
63
+ Everyone interacting in the Omniauth::IdcatMobil project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/omniauth-idcat_mobil/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "omniauth/idcat_mobil"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,9 @@
1
+ require "omniauth/idcat_mobil/version"
2
+ require "omniauth/strategies/idcat_mobil"
3
+
4
+ OmniAuth.config.add_camelization "idcat_mobil", "IdCatMobil"
5
+
6
+ module Omniauth
7
+ module IdCatMobil
8
+ end
9
+ end
@@ -0,0 +1,21 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="126" height="131" viewBox="0 0 126 131">
2
+ <g fill="none" fill-rule="evenodd" transform="translate(1)">
3
+ <polygon fill="#76CA45" points="124 .97 63 .97 63 41.97 73 41.97 73 52.97 85.69 41.97 124 41.97"/>
4
+ <polygon fill="#EE3B33" points="28.98 61.52 27.51 66.2 30.38 66.2 29.02 61.52"/>
5
+ <path fill="#EE3B33" fill-rule="nonzero" d="M0,1 L0,87 L54,87 L54,1 L0,1 Z M7.07,16.06 L16.53,16.06 L16.53,22.7 L7.07,22.7 L7.07,16.06 Z M7.07,25.38 L16.53,25.38 L16.53,50.16 L7.07,50.16 L7.07,25.38 Z M13.62,72 C8.72,72 5.94,68.51 5.94,64 C5.94,59.22 8.94,56.06 13.62,56.06 C17.79,56.06 20.08,58.27 20.48,62.06 L15.94,62.06 C15.8307348,60.7950513 14.7696503,59.8252897 13.5,59.83 C11.31,59.83 10.61,61.95 10.61,63.99 C10.61,66.03 11.31,68.15 13.5,68.15 C15.07,68.15 15.68,67.05 15.96,65.63 L20.55,65.63 C20.55,68.72 18.06,72 13.62,72 Z M31.38,24.76 C34.0535056,24.6825616 36.5920951,25.9331351 38.16,28.1 L38.26,28.1 L38.26,16.1 L47.71,16.1 L47.71,50.2 L38.59,50.2 L38.59,47.44 L38.5,47.44 C37.3,49.02 35.87,50.78 31.24,50.78 C24.24,50.78 20.82,43.86 20.82,37.65 C20.82,31.82 23.07,24.76 31.38,24.76 Z M32,71.61 L31.36,69.45 L26.49,69.45 L25.81,71.61 L21.12,71.61 L26.7,56.45 L31.27,56.45 L36.79,71.61 L32,71.61 Z M48.9,60.34 L44.6,60.34 L44.6,71.61 L39.93,71.61 L39.93,60.34 L35.68,60.34 L35.68,56.45 L48.85,56.45 L48.9,60.34 Z"/>
6
+ <path fill="#EE3B33" d="M34.44,43.91 C37.83,43.91 38.59,40.71 38.59,37.75 C38.59,34.79 37.83,31.63 34.44,31.63 C31.05,31.63 30.28,34.83 30.28,37.75 C30.28,40.67 31,43.91 34.44,43.91 Z"/>
7
+ <path fill="#FFF" d="M71.76,17 L71.76,18.5 C72.4848792,17.3423249 73.7753081,16.6627499 75.14,16.72 C75.7470729,16.7100853 76.3475179,16.8473298 76.89,17.12 C77.4346292,17.4070568 77.8363548,17.9064995 78,18.5 C78.3355217,17.9424632 78.815885,17.4862908 79.39,17.18 C79.9708788,16.8690852 80.6212104,16.7108034 81.28,16.72 C81.7586293,16.7161822 82.2357979,16.773308 82.7,16.89 C83.0971088,16.9917662 83.4684435,17.1757301 83.79,17.43 C84.1004802,17.6800686 84.3443724,18.0029682 84.5,18.37 C84.6791874,18.8073781 84.7643649,19.2775581 84.75,19.75 L84.75,27.41 L83.07,27.41 L83.07,20.56 C83.0754202,20.254697 83.048605,19.9496744 82.99,19.65 C82.946335,19.384076 82.8438412,19.1312579 82.69,18.91 C82.532307,18.6927776 82.3177813,18.5232331 82.07,18.42 C81.7551416,18.2824483 81.4133662,18.217511 81.07,18.23 C80.3323595,18.1949271 79.6116092,18.458001 79.07,18.96 C78.5760032,19.481745 78.3160038,20.1822989 78.35,20.9 L78.35,27.41 L76.61,27.41 L76.61,20.56 C76.6127179,20.2477007 76.5825516,19.9359829 76.52,19.63 C76.4642433,19.3659956 76.3590618,19.1149172 76.21,18.89 C76.0575364,18.6782576 75.8500456,18.5122649 75.61,18.41 C75.2950643,18.2734995 74.9527663,18.2118858 74.61,18.23 C74.1635493,18.2194691 73.7221612,18.3263678 73.33,18.54 C72.9947263,18.7193414 72.6988784,18.964181 72.46,19.26 C72.2497866,19.5246602 72.084269,19.8219162 71.97,20.14 C71.8820357,20.3843404 71.8314658,20.6405612 71.82,20.9 L71.82,27.41 L70.15,27.41 L70.15,17 L71.76,17 Z"/>
8
+ <path fill="#FFF" fill-rule="nonzero" d="M87.13 20C87.343533 19.3619217 87.6836575 18.7735064 88.13 18.27 88.572189 17.7685994 89.1181404 17.3693725 89.73 17.1 91.1327743 16.5396313 92.6972257 16.5396313 94.1 17.1 94.7089098 17.3695046 95.2515686 17.7688196 95.69 18.27 96.1363425 18.7735064 96.476467 19.3619217 96.69 20 96.9059858 20.7095715 97.0105632 21.4483599 97 22.19 97.0048949 22.9156074 96.8969387 23.637564 96.68 24.33 96.466467 24.9680783 96.1263425 25.5564936 95.68 26.06 95.243326 26.5581363 94.6998111 26.9512446 94.09 27.21 92.6872257 27.7703687 91.1227743 27.7703687 89.72 27.21 89.1072659 26.9513414 88.5604693 26.5583314 88.12 26.06 87.6736575 25.5564936 87.333533 24.9680783 87.12 24.33 86.9030613 23.637564 86.7951051 22.9156074 86.8 22.19 86.7959117 21.4473145 86.9072395 20.7085028 87.13 20zM88.88 23.84C89.0273993 24.2932754 89.2655732 24.7117809 89.58 25.07 89.853586 25.3935809 90.1949811 25.6530412 90.58 25.83 90.976256 26.0067648 91.4061398 26.095471 91.84 26.09 92.2738602 26.095471 92.703744 26.0067648 93.1 25.83 93.4850189 25.6530412 93.826414 25.3935809 94.1 25.07 94.4144268 24.7117809 94.6526007 24.2932754 94.8 23.84 95.1335405 22.7414254 95.1335405 21.5685746 94.8 20.47 94.6505703 20.0116034 94.4127555 19.5869342 94.1 19.22 93.826414 18.8964191 93.4850189 18.6369588 93.1 18.46 92.7045154 18.2797953 92.2745991 18.1876704 91.84 18.19 91.4054009 18.1876704 90.9754846 18.2797953 90.58 18.46 90.1949811 18.6369588 89.853586 18.8964191 89.58 19.22 89.2672445 19.5869342 89.0294297 20.0116034 88.88 20.47 88.5464595 21.5685746 88.5464595 22.7414254 88.88 23.84zM88.88 11.84L91.71 15.11 93 15.11 91 11.85 88.88 11.84zM100.75 13L100.75 18.4C101.025323 17.8298745 101.497781 17.3787306 102.08 17.13 102.712828 16.8640934 103.39363 16.731337 104.08 16.74 104.807627 16.7244654 105.529227 16.8749412 106.19 17.18 106.774364 17.4658194 107.287002 17.879347 107.69 18.39 108.091341 18.9117023 108.39614 19.5009799 108.59 20.13 108.793137 20.8113483 108.894234 21.5190273 108.89 22.23 108.892445 22.9401462 108.794819 23.647095 108.6 24.33 108.415713 24.957883 108.113679 25.544983 107.71 26.06 107.304717 26.5557021 106.791706 26.9524307 106.21 27.22 105.555179 27.5206521 104.840325 27.6677274 104.12 27.65 103.831729 27.6450075 103.544246 27.6182648 103.26 27.57 102.938211 27.5125828 102.623209 27.4221033 102.32 27.3 102.007528 27.1802396 101.714386 27.0151367 101.45 26.81 101.168991 26.5970944 100.931374 26.3323217 100.75 26.03L100.75 27.43 99 27.43 99 13 100.75 13zM106.92 20.69C106.803557 20.243061 106.603348 19.8222824 106.33 19.45 106.072891 19.0825299 105.729511 18.7837892 105.33 18.58 104.409264 18.1274747 103.330736 18.1274747 102.41 18.58 102.013832 18.8018267 101.672188 19.1093062 101.41 19.48 101.150988 19.8627392 100.964555 20.2898394 100.86 20.74 100.743839 21.2076972 100.686728 21.6881045 100.69 22.17 100.688234 22.6721945 100.748695 23.1726732 100.87 23.66 100.977501 24.1126462 101.171012 24.5404075 101.44 24.92 101.703175 25.2845656 102.044932 25.5853119 102.44 25.8 102.908534 26.0325101 103.427187 26.1458581 103.95 26.13 104.464821 26.1506213 104.975795 26.0332355 105.43 25.79 105.835117 25.576388 106.17924 25.2632361 106.43 24.88 106.68274 24.4853371 106.862276 24.0483517 106.96 23.59 107.068637 23.0974548 107.122298 22.5943782 107.12 22.09 107.118849 21.6097289 107.05155 21.1319051 106.92 20.67L106.92 20.69zM111.05 15.08L111.05 13 112.77 13 112.77 15.1 111.05 15.08zM112.77 17L112.77 27.41 111.05 27.41 111.05 17 112.77 17z"/>
9
+ <polygon fill="#FFF" points="117.25 13 117.25 27.41 115.53 27.41 115.53 13"/>
10
+ <path fill="#000" fill-rule="nonzero" d="M.42 98.7L.42 97.14 1.69 97.14 1.69 98.7.42 98.7zM1.69 100.09L1.69 107.85.42 107.85.42 100.09 1.69 100.09zM9.33 107.85L9.33 106.85C9.12502073 107.274386 8.76812045 107.606303 8.33 107.78 7.85718278 107.972469 7.35043229 108.067697 6.84 108.06 6.30136548 108.073325 5.7670972 107.960306 5.28 107.73 4.8474248 107.525649 4.4676377 107.224556 4.17 106.85 3.86509784 106.467535 3.63753523 106.029392 3.5 105.56 3.33919463 105.055411 3.25492523 104.52957 3.25 104 3.25011974 103.472278 3.32417281 102.947174 3.47 102.44 3.60835642 101.972895 3.83214028 101.535499 4.13 101.15 4.43533275 100.78582 4.81341768 100.489483 5.24 100.28 5.726636 100.059994 6.25602375 99.9507014 6.79 99.96 7.00797932 99.9614662 7.22543557 99.9815391 7.44 100.02 7.67610863 100.063428 7.90726571 100.13043 8.13 100.22 8.36257147 100.317257 8.58115863 100.445047 8.78 100.6 8.99076463 100.756187 9.16766348 100.953498 9.3 101.18L9.3 97.18 10.6 97.18 10.6 107.89 9.33 107.85zM4.75 105.09C4.83576558 105.423506 4.98146964 105.738633 5.18 106.02 5.37861567 106.287089 5.6349952 106.505867 5.93 106.66 6.26183058 106.825857 6.62911976 106.90824 7 106.9 7.38211925 106.913224 7.76113279 106.827085 8.1 106.65 8.39029719 106.483961 8.63973237 106.255027 8.83 105.98 9.02312177 105.69321 9.1652138 105.375195 9.25 105.04 9.32992834 104.692337 9.37018539 104.336733 9.37 103.98 9.37234277 103.606069 9.32868161 103.23327 9.24 102.87 9.15853141 102.534979 9.01246845 102.219075 8.81 101.94 8.61054155 101.664712 8.35052519 101.438908 8.05 101.28 7.70486538 101.097305 7.32050468 101.001215 6.93 101 6.54788075 100.986776 6.16886721 101.072915 5.83 101.25 5.53678776 101.412721 5.28919727 101.646557 5.11 101.93 4.91973785 102.236577 4.78753504 102.575559 4.72 102.93 4.64235699 103.281433 4.60213289 103.640098 4.6 104 4.59539624 104.368779 4.64595512 104.736173 4.75 105.09zM18.06 107.35C17.4238247 107.807655 16.6531169 108.039923 15.87 108.01 15.3183865 108.022109 14.7702325 107.919969 14.26 107.71 13.817569 107.52146 13.4241833 107.234117 13.11 106.87 12.7917291 106.491832 12.553582 106.052961 12.41 105.58 12.2532283 105.050192 12.1658327 104.502289 12.15 103.95 12.1435942 103.39829 12.2350075 102.84981 12.42 102.33 12.5869434 101.857623 12.8451792 101.4227 13.18 101.05 13.5001436 100.692406 13.8919706 100.406202 14.33 100.21 14.7897669 100.007224 15.2875279 99.9049443 15.79 99.91 16.3927354 99.8851368 16.989875 100.034422 17.51 100.34 17.9563066 100.61302 18.3329156 100.986205 18.61 101.43 18.8814298 101.873633 19.0742597 102.360782 19.18 102.87 19.2774676 103.356981 19.3177403 103.853678 19.3 104.35L13.5 104.35C13.4854007 104.687639 13.5259321 105.025401 13.62 105.35 13.7042791 105.647435 13.8508552 105.923543 14.05 106.16 14.2631468 106.400157 14.5258544 106.591217 14.82 106.72 15.1641639 106.867049 15.535838 106.938656 15.91 106.93 16.3815487 106.952561 16.8478479 106.822838 17.24 106.56 17.6043944 106.281194 17.8478151 105.873106 17.92 105.42L19.18 105.42C19.0610272 106.180711 18.6614467 106.869274 18.06 107.35zM17.75 102.35C17.6420445 102.089819 17.4859833 101.852334 17.29 101.65 17.0896313 101.4563 16.8558652 101.300456 16.6 101.19 16.0317429 100.963476 15.3982571 100.963476 14.83 101.19 14.569498 101.296383 14.3343761 101.456538 14.14 101.66 13.9470267 101.862732 13.79432 102.100276 13.69 102.36 13.5800431 102.63086 13.5158362 102.918101 13.5 103.21L18 103.21C17.9665734 102.917505 17.8819504 102.633172 17.75 102.37L17.75 102.35z"/>
11
+ <path fill="#000" d="M21.82 100.09L21.82 101.32C22.313325 100.398951 23.2969619 99.8485829 24.34 99.91 24.7762063 99.8969591 25.2108274 99.9682641 25.62 100.12 25.9374655 100.246657 26.2190231 100.449241 26.44 100.71 26.6558527 100.968505 26.8097714 101.272921 26.89 101.6 26.9736365 101.977517 27.0138972 102.363349 27.01 102.75L27.01 107.85 25.77 107.85 25.77 102.6C25.7921404 102.1785 25.6403091 101.766387 25.35 101.46 25.0368418 101.167581 24.6177778 101.015851 24.19 101.04 23.8480726 101.033649 23.5082514 101.094817 23.19 101.22 22.9174413 101.333458 22.6745445 101.507934 22.48 101.73 22.286836 101.955482 22.1406442 102.217267 22.05 102.5 21.952154 102.824143 21.9049313 103.161449 21.91 103.5L21.91 107.88 20.62 107.88 20.62 100.12 21.82 100.09zM32.28 100.09L32.28 101.22 30.73 101.22 30.73 106C30.7167078 106.119632 30.7167078 106.240368 30.73 106.36 30.7521003 106.443583 30.8013469 106.517453 30.87 106.57 30.9610631 106.62578 31.0636813 106.659986 31.17 106.67L31.65 106.67 32.24 106.67 32.24 107.8 31.24 107.8C30.9585071 107.800888 30.6774633 107.777467 30.4 107.73 30.1919602 107.69606 29.9958818 107.610061 29.83 107.48 29.6697784 107.348331 29.5544562 107.170106 29.5 106.97 29.4242914 106.686452 29.3905992 106.39333 29.4 106.1L29.4 101.17 28.14 101.17 28.14 100.04 29.46 100.04 29.46 97.77 30.73 97.77 30.73 100.09 32.28 100.09z"/>
12
+ <path fill="#000" fill-rule="nonzero" d="M33.76,98.7 L33.76,97.14 L35,97.14 L35,98.7 L33.76,98.7 Z M35,100.09 L35,107.85 L33.76,107.85 L33.76,100.09 L35,100.09 Z"/>
13
+ <path fill="#000" d="M40.33,100.09 L40.33,101.22 L38.79,101.22 L38.79,106 C38.7717437,106.119306 38.7717437,106.240694 38.79,106.36 C38.8079947,106.44537 38.8581183,106.520555 38.93,106.57 C39.0180841,106.624365 39.1171287,106.658518 39.22,106.67 L39.71,106.67 L40.29,106.67 L40.29,107.8 L39.29,107.8 C39.0052111,107.800393 38.7208877,107.776979 38.44,107.73 C38.2332291,107.691849 38.03812,107.606275 37.87,107.48 C37.7175665,107.343415 37.6066688,107.166672 37.55,106.97 C37.4698978,106.68716 37.432816,106.393876 37.44,106.1 L37.44,101.17 L36.19,101.17 L36.19,100.04 L37.51,100.04 L37.51,97.77 L38.79,97.77 L38.79,100.09 L40.33,100.09 Z"/>
14
+ <path fill="#000" fill-rule="nonzero" d="M48.61,107.82 C48.3286929,107.96237 48.0147728,108.027913 47.7,108.01 C47.4097108,108.026821 47.1249028,107.925876 46.91,107.73 C46.6942299,107.482335 46.5894149,107.157047 46.62,106.83 C46.2970925,107.229501 45.8770125,107.539397 45.4,107.73 C44.9194764,107.919988 44.4066939,108.015073 43.89,108.01 C43.5529958,108.011352 43.2171165,107.971046 42.89,107.89 C42.5955512,107.82015 42.3172043,107.694554 42.07,107.52 C41.8379124,107.344192 41.6524944,107.114137 41.53,106.85 C41.3824873,106.537768 41.310547,106.195195 41.32,105.85 C41.3070165,105.476593 41.3859994,105.105716 41.55,104.77 C41.6924322,104.50144 41.8942104,104.268882 42.14,104.09 C42.3974955,103.913796 42.6809028,103.77884 42.98,103.69 C43.3,103.6 43.62,103.53 43.98,103.47 C44.3103661,103.399538 44.6441413,103.346134 44.98,103.31 C45.2593065,103.275907 45.5364281,103.225825 45.81,103.16 C46.0199576,103.10895 46.2151227,103.009656 46.38,102.87 C46.5282341,102.731137 46.6054716,102.532526 46.59,102.33 C46.6023746,102.092734 46.5468736,101.856855 46.43,101.65 C46.3335552,101.486872 46.1955168,101.352285 46.03,101.26 C45.8554536,101.167339 45.6658464,101.106394 45.47,101.08 C45.2669393,101.065108 45.0630607,101.065108 44.86,101.08 C44.391792,101.063371 43.9270985,101.166636 43.51,101.38 C43.1237833,101.640356 42.9033688,102.084985 42.93,102.55 L41.62,102.55 C41.6255951,102.125769 41.7282154,101.708447 41.92,101.33 C42.0907461,101.008312 42.3380126,100.733571 42.64,100.53 C42.9435924,100.323362 43.2825452,100.174223 43.64,100.09 C44.0466543,99.9962709 44.4626843,99.9492998 44.88,99.95 C45.2147763,99.9536407 45.5489028,99.9803708 45.88,100.03 C46.2086217,100.073567 46.5268959,100.175144 46.82,100.33 C47.0939117,100.487579 47.324195,100.710988 47.49,100.98 C47.6750916,101.316198 47.7649839,101.696511 47.75,102.08 L47.75,106.08 C47.7233087,106.29919 47.7233087,106.52081 47.75,106.74 C47.75,106.88 47.9,106.95 48.1,106.95 C48.2320253,106.946697 48.363087,106.926533 48.49,106.89 L48.61,107.82 Z M46.54,103.82 C46.3523876,103.953237 46.1369732,104.042138 45.91,104.08 C45.65,104.14 45.38,104.18 45.1,104.22 C44.82,104.26 44.52,104.29 44.23,104.34 C43.9617218,104.374516 43.6993439,104.445156 43.45,104.55 C43.2298869,104.643522 43.0371787,104.791494 42.89,104.98 C42.7350234,105.198443 42.6575802,105.462454 42.67,105.73 C42.6663355,105.914985 42.7111541,106.097707 42.8,106.26 C42.8830938,106.399386 42.9957386,106.518858 43.13,106.61 C43.27329,106.704527 43.4325324,106.77229 43.6,106.81 C43.7872341,106.850784 43.9783775,106.870905 44.17,106.87 C44.5371713,106.876925 44.902711,106.819386 45.25,106.7 C45.5220598,106.601001 45.7730853,106.451743 45.99,106.26 C46.1677673,106.104894 46.3108733,105.914086 46.41,105.7 C46.4926459,105.517626 46.5368961,105.320202 46.54,105.12 L46.54,103.82 Z"/>
15
+ <path fill="#000" d="M53.11,100.09 L53.11,101.22 L51.57,101.22 L51.57,106 C51.5574805,106.119673 51.5574805,106.240327 51.57,106.36 C51.5960918,106.444321 51.6486988,106.517971 51.72,106.57 C51.8074711,106.625647 51.9068211,106.659906 52.01,106.67 L52.5,106.67 L53.08,106.67 L53.08,107.8 L52.08,107.8 C51.7951901,107.800918 51.5108225,107.7775 51.23,107.73 C51.0219602,107.69606 50.8258818,107.610061 50.66,107.48 C50.5034742,107.34691 50.3917419,107.168837 50.34,106.97 C50.2598978,106.68716 50.222816,106.393876 50.23,106.1 L50.23,101.17 L49,101.17 L49,100.04 L50.32,100.04 L50.32,97.77 L51.6,97.77 L51.6,100.09 L53.11,100.09 Z"/>
16
+ <path fill="#000" fill-rule="nonzero" d="M8.2 125.85L8.2 124.45C7.92731086 125.011486 7.45741676 125.452902 6.88 125.69 6.2456459 125.949789 5.56542977 126.07903 4.88 126.07 4.15889849 126.084597 3.44400856 125.934094 2.79 125.63 2.21891507 125.345529 1.71452373 124.943379 1.31 124.45.91021412 123.936194.608511788 123.353128.42 122.73.217665864 122.055323.116564865 121.354356.12 120.65.116742468 119.946369.214403105 119.245906.41 118.57.589917534 117.948426.888778027 117.367686 1.29 116.86 1.69005074 116.367188 2.19588132 115.970726 2.77 115.7 3.41838993 115.401322 4.12629808 115.254269 4.84 115.27 5.12860508 115.268202 5.41667841 115.295 5.7 115.35 6.01667303 115.401517 6.32571088 115.492212 6.62 115.62 6.93288005 115.743247 7.22599775 115.911706 7.49 116.12 7.77236355 116.32443 8.00764498 116.586991 8.18 116.89L8.18 111.57 9.88 111.57 9.88 125.85 8.2 125.85zM2.09 122.18C2.20941565 122.620948 2.40576413 123.037342 2.67 123.41 2.93540994 123.767299 3.27699764 124.061064 3.67 124.27 4.11437419 124.489045 4.60464928 124.598757 5.1 124.59 5.60759719 124.602043 6.10994668 124.485057 6.56 124.25 6.95611424 124.032441 7.2979575 123.728201 7.56 123.36 7.82119311 122.982121 8.00786602 122.557865 8.11 122.11 8.22616232 121.6457 8.28328003 121.168599 8.28 120.69 8.2817687 120.194397 8.22129562 119.700534 8.1 119.22 7.98279879 118.779479 7.78254496 118.365395 7.51 118 7.24967298 117.635439 6.90707489 117.337379 6.51 117.13 6.04502582 116.897528 5.52960812 116.784136 5.01 116.8 4.50189947 116.782945 3.99829033 116.900223 3.55 117.14 3.14320896 117.346677 2.79823703 117.657152 2.55 118.04 2.30373599 118.433276 2.12777854 118.866402 2.03 119.32 1.9257447 119.806491 1.87212566 120.302468 1.87 120.8 1.88511033 121.267412 1.95902523 121.73106 2.09 122.18zM12.62 113.65L12.62 111.57 14.32 111.57 14.32 113.65 12.62 113.65zM14.32 115.51L14.32 125.85 12.62 125.85 12.62 115.51 14.32 115.51zM24.72 128.77C23.736654 129.67875 22.4130089 130.126025 21.08 130 20.5859297 129.995153 20.0935436 129.94156 19.61 129.84 19.1320787 129.739479 18.673071 129.563976 18.25 129.32 17.8555425 129.078807 17.5151085 128.758799 17.25 128.38 16.980001 127.968177 16.8246678 127.491822 16.8 127L18.5 127C18.5107446 127.284327 18.6123884 127.557714 18.79 127.78 18.9757241 127.992894 19.1995578 128.169248 19.45 128.3 19.7193087 128.433719 20.0051203 128.531231 20.3 128.59 20.5897702 128.648139 20.8844599 128.678278 21.18 128.68 21.6693455 128.693923 22.1552985 128.594679 22.6 128.39 22.9930844 128.208063 23.3362133 127.933559 23.6 127.59 23.8698997 127.224467 24.0575245 126.804869 24.15 126.36 24.2706798 125.842201 24.3277678 125.311619 24.32 124.78L24.32 124.1C24.0571909 124.712383 23.5860062 125.21191 22.99 125.51 22.3786848 125.838751 21.6940675 126.007325 21 126 20.3102092 126.012421 19.6265246 125.868847 19 125.58 18.4449598 125.310252 17.9539912 124.924978 17.56 124.45 17.1709101 123.954536 16.8760282 123.391888 16.69 122.79 16.4971015 122.14087 16.3994171 121.467185 16.4 120.79 16.4021678 120.15254 16.4827735 119.51777 16.64 118.9 16.7927122 118.267933 17.0641989 117.670663 17.44 117.14 17.8300229 116.601545 18.3357455 116.15733 18.92 115.84 19.6179389 115.481219 20.3956193 115.305725 21.18 115.33 21.8065482 115.320278 22.4254967 115.468138 22.98 115.76 23.5262414 116.028739 23.97406 116.462563 24.26 117L24.26 115.52 25.86 115.52 25.86 125C25.9661947 126.355159 25.5593056 127.700748 24.72 128.77zM22.55 124.12C22.9358208 123.8939 23.2616398 123.57837 23.5 123.2 23.74869 122.803243 23.9279239 122.366994 24.03 121.91 24.1456585 121.438816 24.2027563 120.955164 24.2 120.47 24.2022843 120.018436 24.1485406 119.568332 24.04 119.13 23.9470827 118.704555 23.7739999 118.300695 23.53 117.94 23.3038929 117.583885 22.9906866 117.29133 22.62 117.09 22.20417 116.861726 21.7339899 116.751095 21.26 116.77 20.774821 116.755364 20.2936468 116.86191 19.86 117.08 19.4824514 117.278084 19.1569669 117.562455 18.91 117.91 18.6589804 118.274091 18.476024 118.680661 18.37 119.11 18.2563513 119.574759 18.199271 120.051548 18.2 120.53 18.2025163 121.000032 18.2493908 121.468777 18.34 121.93 18.4333303 122.375618 18.5952575 122.80405 18.82 123.2 19.045361 123.571718 19.3533239 123.886525 19.72 124.12 20.145105 124.364423 20.6298846 124.485618 21.12 124.47 21.6194583 124.483961 22.1134477 124.363055 22.55 124.12zM28.54 113.65L28.54 111.57 30.24 111.57 30.24 113.65 28.54 113.65zM30.24 115.51L30.24 125.85 28.54 125.85 28.54 115.51 30.24 115.51z"/>
17
+ <path fill="#000" d="M37.3,115.51 L37.3,117 L35.24,117 L35.24,123.42 C35.2207304,123.57942 35.2207304,123.74058 35.24,123.9 C35.2729453,124.010693 35.3393091,124.108492 35.43,124.18 C35.5495939,124.249875 35.6823997,124.294144 35.82,124.31 C36.0364957,124.322171 36.2535043,124.322171 36.47,124.31 L37.25,124.31 L37.25,125.81 L36,125.81 C35.6213658,125.814852 35.2430927,125.784724 34.87,125.72 C34.5934449,125.673966 34.3324505,125.560639 34.11,125.39 C33.9078075,125.206392 33.7591988,124.971383 33.68,124.71 C33.5779221,124.332053 33.530772,123.941381 33.54,123.55 L33.54,117 L31.78,117 L31.78,115.5 L33.54,115.5 L33.54,112.4 L35.24,112.4 L35.24,115.5 L37.3,115.51 Z"/>
18
+ <path fill="#000" fill-rule="nonzero" d="M48.34,125.81 C47.9628843,126.001346 47.5423623,126.090965 47.12,126.07 C46.7524384,126.07424 46.3962818,125.942462 46.12,125.7 C45.8295206,125.367242 45.6885125,124.929755 45.73,124.49 C45.2982001,125.025171 44.7372453,125.441586 44.1,125.7 C43.4620067,125.946151 42.7838299,126.071614 42.1,126.07 C41.6519583,126.068485 41.2056176,126.01479 40.77,125.91 C40.3792539,125.81109 40.0098593,125.641643 39.68,125.41 C39.3720134,125.17285 39.122319,124.868428 38.95,124.52 C38.5702584,123.635711 38.5702584,122.634289 38.95,121.75 C39.1384335,121.388984 39.4090346,121.077279 39.74,120.84 C40.0789499,120.598314 40.4581911,120.418852 40.86,120.31 C41.28,120.19 41.71,120.09 42.15,120.01 C42.5889508,119.914613 43.0330142,119.844498 43.48,119.8 C43.8538175,119.756606 44.2245453,119.689808 44.59,119.6 C44.8684172,119.531365 45.1280418,119.401553 45.35,119.22 C45.5472317,119.030403 45.6498502,118.762862 45.63,118.49 C45.6466047,118.17617 45.5737822,117.864073 45.42,117.59 C45.2898301,117.371424 45.1033306,117.191832 44.88,117.07 C44.6499793,116.945668 44.3992083,116.864337 44.14,116.83 C43.8718398,116.790136 43.6011071,116.770082 43.33,116.77 C42.7042534,116.744577 42.0830079,116.886083 41.53,117.18 C41.0125499,117.520918 40.7154532,118.111303 40.75,118.73 L39,118.73 C39.0089386,118.166677 39.1457125,117.612743 39.4,117.11 C39.6398185,116.676197 39.9833893,116.308576 40.4,116.04 C40.8148142,115.757677 41.2798559,115.557404 41.77,115.45 C42.3113968,115.327637 42.8649544,115.267249 43.42,115.27 C43.8851965,115.268104 44.3498655,115.301534 44.81,115.37 C45.2493289,115.424238 45.6738947,115.563495 46.06,115.78 C46.4345909,115.976764 46.7464211,116.274735 46.96,116.64 C47.2053691,117.086167 47.3230107,117.591334 47.3,118.1 L47.3,123.41 C47.29424,123.704924 47.3176877,123.999695 47.37,124.29 C47.37,124.47 47.58,124.57 47.84,124.57 C48.0159094,124.56423 48.1904908,124.537371 48.36,124.49 L48.34,125.81 Z M45.58,120.51 C45.3278844,120.684725 45.0415902,120.804014 44.74,120.86 C44.4,120.93 44.03,120.99 43.65,121.03 L42.5,121.19 C42.1566086,121.247823 41.8210495,121.345136 41.5,121.48 C41.2065454,121.604771 40.9487876,121.800667 40.75,122.05 C40.5452416,122.342012 40.4432385,122.693747 40.46,123.05 C40.4533509,123.297487 40.511983,123.542362 40.63,123.76 C40.7414244,123.946287 40.8914561,124.106548 41.07,124.23 C41.2635778,124.352073 41.4766712,124.440016 41.7,124.49 C41.9499697,124.54234 42.2046109,124.569144 42.46,124.57 C42.9498873,124.579996 43.4375999,124.502098 43.9,124.34 C44.2677831,124.213326 44.607421,124.016336 44.9,123.76 C45.1416702,123.552212 45.3331282,123.292376 45.46,123 C45.5728245,122.76216 45.6341622,122.503179 45.64,122.24 L45.58,120.51 Z"/>
19
+ <polygon fill="#000" points="51.72 111.57 51.72 125.85 50 125.85 50 111.57"/>
20
+ </g>
21
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="44" height="56" viewBox="0 0 44 56">
2
+ <g fill="#FFF" fill-rule="evenodd">
3
+ <path fill-rule="nonzero" d="M11.53 6.73L2.07 6.73 2.07.09 11.53.09 11.53 6.73zM2.07 9.4L11.53 9.4 11.53 34.19 2.07 34.19 2.07 9.4zM42.71 34.19L33.59 34.19 33.59 31.47 33.5 31.47C32.3 33.04 30.87 34.81 26.24 34.81 19.24 34.81 15.82 27.89 15.82 21.68 15.82 15.85 18.07 8.78 26.38 8.78 29.05573 8.70308662 31.5954717 9.95797374 33.16 12.13L33.26 12.13 33.26.13 42.71.13 42.71 34.19zM29.44 15.66C26.04 15.66 25.28 18.86 25.28 21.77 25.28 24.68 26.04 27.93 29.44 27.93 32.84 27.93 33.59 24.73 33.59 21.77 33.59 18.81 32.83 15.66 29.44 15.66z"/>
4
+ <path d="M10.94,46.13 C10.8353818,44.8627645 9.77151075,43.8904562 8.5,43.9 C6.31,43.9 5.61,46.02 5.61,48.06 C5.61,50.1 6.31,52.22 8.5,52.22 C10.07,52.22 10.68,51.12 10.96,49.69 L15.55,49.69 C15.55,52.75 13.06,56 8.62,56 C3.72,56 0.94,52.54 0.94,48.06 C0.94,43.28 3.94,40.12 8.62,40.12 C12.79,40.12 15.08,42.32 15.48,46.12 L10.94,46.13 Z"/>
5
+ <path fill-rule="nonzero" d="M21.7,40.48 L26.27,40.48 L31.79,55.64 L27,55.64 L26.36,53.47 L21.49,53.47 L20.81,55.64 L16.12,55.64 L21.7,40.48 Z M25.38,50.22 L24,45.55 L22.53,50.22 L25.38,50.22 Z"/>
6
+ <polygon points="34.93 44.36 30.68 44.36 30.68 40.48 43.85 40.48 43.85 44.36 39.6 44.36 39.6 55.64 34.93 55.64"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,5 @@
1
+ module Omniauth
2
+ module IdCatMobil
3
+ VERSION = "0.1.1"
4
+ end
5
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "omniauth-oauth2"
4
+ require "open-uri"
5
+
6
+ module OmniAuth
7
+ module Strategies
8
+ # OAuth references:
9
+ # - https://github.com/omniauth/omniauth/wiki/Strategy-Contribution-Guide
10
+ # - https://github.com/omniauth/omniauth/blob/master/lib/omniauth/strategy.rb
11
+ # - https://github.com/omniauth/omniauth-oauth2/blob/master/lib/omniauth/strategies/oauth2.rb
12
+ # IdCat mòbil references:
13
+ # - https://www.aoc.cat/wp-content/uploads/2016/01/di-valid-1.pdf
14
+ class IdCatMobil < OmniAuth::Strategies::OAuth2
15
+ # constructor arguments after `app` the first argument that should be a RackApp
16
+ args [:client_id, :client_secret, :site]
17
+
18
+ option :name, :idcat_mobil
19
+ option :auth_token_params, {
20
+ mode: :query, # put the param in the query of the requested url
21
+ param_name: 'AccessToken'
22
+ }
23
+
24
+ option :user_info_path, "/serveis-rest/getUserInfo"
25
+
26
+ # uid: this is a unique string identifier that is globally unique to the provider you're writing
27
+ uid do
28
+ raw_info["identifier"]
29
+ end
30
+
31
+ # info: this method should return a hash of information about the user with keys taken from the [Auth Hash Schema](https://github.com/omniauth/omniauth/wiki/Auth-Hash-Schema)
32
+ info do
33
+ {
34
+ email: raw_info["email"],
35
+ name: raw_info["name"],
36
+ prefix: raw_info["prefix"],
37
+ phone: raw_info["phone"],
38
+ surname1: raw_info["surname1"],
39
+ surname2: raw_info["surname2"],
40
+ surnames: raw_info["surnames"],
41
+ country_code: raw_info["countryCode"],
42
+ }
43
+ end
44
+
45
+ # extra: this method returns information not directly related with the user
46
+ def extra
47
+ {
48
+ identifier_type: raw_info["identifierType"],
49
+ method: raw_info["method"],
50
+ assurance_level: raw_info["assuranceLevel"],
51
+ status: raw_info["status"]
52
+ }
53
+ end
54
+
55
+ def client
56
+ options.client_options[:site] = options.site
57
+ options.client_options[:authorize_url] = URI.join(options.site, "/o/oauth2/auth").to_s
58
+ options.client_options[:authorize_params] = {
59
+ scope: :autenticacio_usuari,
60
+ response_type: :code,
61
+ approval_prompt: :auto,
62
+ access_type: :online,
63
+ }
64
+ options.client_options[:token_url] = URI.join(options.site, "/o/oauth2/token").to_s
65
+ options.client_options[:auth_token_params] = {
66
+ client_id: super.id,
67
+ client_secret: super.secret,
68
+ redirect_uri: callback_url
69
+ }
70
+ super
71
+ end
72
+
73
+ def raw_info
74
+ unless @raw_info
75
+ @raw_info= access_token.get(options.user_info_path).parsed
76
+ # Logout to avoid problems with IdCat mòbil's cookie session when trying to login again.
77
+ logout_url= URI.join(options.site, "/o/oauth2/logout?token=#{access_token.token}").to_s
78
+ access_token.get(logout_url)
79
+ end
80
+ @raw_info
81
+ end
82
+
83
+ # https://github.com/intridea/omniauth-oauth2/issues/81
84
+ def callback_url
85
+ full_host + script_name + callback_path
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,30 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "omniauth/idcat_mobil/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "omniauth-idcat_mobil"
8
+ spec.version = Omniauth::IdCatMobil::VERSION
9
+ spec.authors = ["Oliver Valls"]
10
+ spec.email = ["oliver.vh@coditramuntana.com"]
11
+
12
+ spec.summary = %q{User registration and login through IdCat mòbil.}
13
+ spec.description = %q{Authentication method that uses OAuth 2.0 protocol.}
14
+ spec.homepage = "https://github.com/gencat/omniauth-idcat_mobil"
15
+ spec.license = "MIT"
16
+
17
+ # Specify which files should be added to the gem when it is released.
18
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ end
22
+ spec.bindir = "exe"
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ["lib"]
25
+
26
+ spec.add_dependency "omniauth", "~> 1.5"
27
+ spec.add_dependency "omniauth-oauth2", ">= 1.4.0", "< 2.0"
28
+ spec.add_development_dependency "bundler", "~> 1.16"
29
+ spec.add_development_dependency "rake", "~> 10.0"
30
+ end
metadata ADDED
@@ -0,0 +1,124 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-idcat_mobil
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Oliver Valls
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-01-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: omniauth-oauth2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.4.0
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '2.0'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.4.0
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.16'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.16'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '10.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '10.0'
75
+ description: Authentication method that uses OAuth 2.0 protocol.
76
+ email:
77
+ - oliver.vh@coditramuntana.com
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - ".gitignore"
83
+ - ".travis.yml"
84
+ - CHANGELOG.md
85
+ - CODE_OF_CONDUCT.md
86
+ - Gemfile
87
+ - Gemfile.lock
88
+ - LICENSE
89
+ - LICENSE.txt
90
+ - README.md
91
+ - Rakefile
92
+ - bin/console
93
+ - bin/setup
94
+ - lib/omniauth/idcat_mobil.rb
95
+ - lib/omniauth/idcat_mobil/idcat_mobil-alt_logo.svg
96
+ - lib/omniauth/idcat_mobil/idcat_mobil-logo.svg
97
+ - lib/omniauth/idcat_mobil/version.rb
98
+ - lib/omniauth/strategies/idcat_mobil.rb
99
+ - omniauth-idcat_mobil.gemspec
100
+ homepage: https://github.com/gencat/omniauth-idcat_mobil
101
+ licenses:
102
+ - MIT
103
+ metadata: {}
104
+ post_install_message:
105
+ rdoc_options: []
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubyforge_project:
120
+ rubygems_version: 2.7.6
121
+ signing_key:
122
+ specification_version: 4
123
+ summary: User registration and login through IdCat mòbil.
124
+ test_files: []