From 88b43244bafb92f64f79c290524e950078a19034 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 21 Dec 2014 00:44:39 +0100 Subject: [PATCH 01/16] remove superfluous file --- lib/omniauth-orcid/version.rb~ | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 lib/omniauth-orcid/version.rb~ diff --git a/lib/omniauth-orcid/version.rb~ b/lib/omniauth-orcid/version.rb~ deleted file mode 100644 index f29e109..0000000 --- a/lib/omniauth-orcid/version.rb~ +++ /dev/null @@ -1,5 +0,0 @@ -module OmniAuth - module ORCID - VERSION = "0.1" - end -end From 3add8fa701738a3b1389429a81a59b3bbf7d01f1 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 21 Dec 2014 00:45:20 +0100 Subject: [PATCH 02/16] change default scope and token_url to values that work for non-members. Add info.name --- lib/omniauth/strategies/orcid.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/omniauth/strategies/orcid.rb b/lib/omniauth/strategies/orcid.rb index 0f1ac40..c257dd4 100644 --- a/lib/omniauth/strategies/orcid.rb +++ b/lib/omniauth/strategies/orcid.rb @@ -6,27 +6,27 @@ module OmniAuth module Strategies class ORCID < OmniAuth::Strategies::OAuth2 - DEFAULT_SCOPE = '/orcid-bio/read-limited' + DEFAULT_SCOPE = '/authenticate' option :client_options, { :site => 'http://api.orcid.org', :authorize_url => 'http://orcid.org/oauth/authorize', - :token_url => 'https://api.orcid.org/oauth/token', - :scope => '/orcid-profile/read-limited', + :token_url => 'https://pub.orcid.org/oauth/token', + :scope => '/authenticate', :response_type => 'code', :mode => :header } # Pull out unique ID for the user in the external system - uid { access_token.params["orcid"] } + uid { access_token.params["orcid"] } - info do{} end + info { { name: access_token.params["name"] } } # Customize the parameters passed to the OAuth provider in the authorization phase def authorize_params - - # Trick shamelessly borrowed from the omniauth-facebook gem! + + # Trick shamelessly borrowed from the omniauth-facebook gem! super.tap do |params| %w[scope].each { |v| params[v.to_sym] = request.params[v] if request.params[v] } params[:scope] ||= DEFAULT_SCOPE # ensure that we're always request *some* default scope From 31859733280f3523f716bafec5e17575cecf5d51 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 21 Dec 2014 01:25:57 +0100 Subject: [PATCH 03/16] added info.email parameter --- lib/omniauth/strategies/orcid.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/omniauth/strategies/orcid.rb b/lib/omniauth/strategies/orcid.rb index c257dd4..5a0141c 100644 --- a/lib/omniauth/strategies/orcid.rb +++ b/lib/omniauth/strategies/orcid.rb @@ -17,11 +17,13 @@ class ORCID < OmniAuth::Strategies::OAuth2 :mode => :header } - # Pull out unique ID for the user in the external system uid { access_token.params["orcid"] } - info { { name: access_token.params["name"] } } + info do + { name: access_token.params["name"], + email: access_token.params["email"] } + end # Customize the parameters passed to the OAuth provider in the authorization phase def authorize_params From c6ef3afeb75ad08686e568409eab1eea67b2af24 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 17:57:42 +0200 Subject: [PATCH 04/16] updated documentation --- CHANGELOG.md | 7 +++ LICENSE.txt | 2 +- README.md | 125 +++++++++++++++-------------------------- config.yml | 16 ------ demo.rb | 19 ++++--- omniauth-orcid.gemspec | 4 +- 6 files changed, 64 insertions(+), 109 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 config.yml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..64b7768 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## v0.7 (July 25, 2015) + +[onmiauth-orcid 0.7](https://github.com/lagotto/lagotto/releases/tag/v0.7) was released on July 25, 2015 with the following changes: + +* changed default scope to `authenticate`, and use the public API `https://pub.orcid.org` by default. These settings work for non-members. +* added `name` and `email` to the `info` hash returned by omniauth (`email` will be empty in almost all cases) +* cleaned up documentation in `README.md` diff --git a/LICENSE.txt b/LICENSE.txt index b6add0c..1ae6bae 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License -Copyright (C) 2012, Gudmundur A. Thorisson +Copyright (C) 2012-2015, Gudmundur A. Thorisson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index cd1e5b8..ee46c69 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ # OmniAuth ORCID -ORCID OAuth 2.0 Strategy for the wonderful [OmniAuth Ruby authentication framework](http://www.omniauth.org). +ORCID OAuth 2.0 Strategy for the [OmniAuth Ruby authentication framework](http://www.omniauth.org). Provides basic support for connecting a client application to the [Open Researcher & Contributor ID registry service](http://orcid.org). Originally created for the [ORCID example client application in Rails](https://github.com/gthorisson/ORCID-example-client-app-rails), then turned into a gem. - ## Installation The usual way with Bundler: add the following to your `Gemfile` to install the current version of the gem: @@ -16,66 +15,63 @@ The usual way with Bundler: add the following to your `Gemfile` to install the c gem 'omniauth-orcid' ``` -Or, if you're impatient, you can install straight from GitHub - -```ruby -gem 'omniauth-orcid' , :git => 'git://github.com/gthorisson/omniauth-orcid.git' -``` - Then run `bundle install` to install into your environment. You can also install the gem system-wide in the usual way: ```bash -[mummi@nfmac07]gem install omniauth-orcid +gem install omniauth-orcid ``` + ## Getting started Like other OmniAuth strategies, `OmniAuth::Strategies::ORCID` is a piece of Rack middleware. Please read the OmniAuth documentation for detailed instructions: https://github.com/intridea/omniauth. - By default the module connects to the live ORCID service. In the very simplest usage, all you have to provide are your client app credentials ([see more here](http://support.orcid.org/knowledgebase/articles/116739)): ```ruby use OmniAuth::Builder do - provider :orcid, ENV['ORCID_KEY'], ENV['ORCID_SECRET'] + provider :orcid, ENV['ORCID_CLIENT_ID'], ENV['ORCID_CLIENT_SECRET'] end ``` +There are three ways to register a client application and obtain client app credentials (`client_id` and `client_secret`) as well as a `site URL`: + +* for non-members (the default): Register your client application in the `Developer Tools` section of your ORCID profile. Use `https://pub.orcid.org` as `site URL` +* for members (production): Register your client application [here](http://orcid.org/content/register-client-application). Use https://api.orcid.org as `site URL` +* for development (sandbox): Register your client application [here](https://orcid.org/content/register-client-application-sandbox). Use https://sandbox.orcid.org as `site URL` + OmniAuth takes care of the OAuth external-authentication handshake or "dance". All that the gem does is grab the identifier and tokens at the end of the dance and stick it into the OmniAuth hash which is subsequently accessible to your app via `request.env['omniauth.auth']` (see [AuthHashSchema](https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema)). The hash looks something like this: ```json { - provider: "orcid", - uid: "0000-0003-2012-0010", - info: { - name: null -}, -credentials: { - token: "e82938fa-a287-42cf-a2ce-f48ef68c9a35", - refresh_token: "f94c58dd-b452-44f4-8863-0bf8486a0071", - expires_at: 1979903874, - expires: true -}, -extra: { } + "provider": "orcid", + "uid": "0000-0003-2012-0010", + "info": { + "name": "John Smith", + "email": null + }, + "credentials": { + "token": "e82938fa-a287-42cf-a2ce-f48ef68c9a35", + "refresh_token": "f94c58dd-b452-44f4-8863-0bf8486a0071", + "expires_at": 1979903874, + "expires": true + }, + "extra": { + } } ``` -You have to implement a callback handler to grab at least the `uid` from the hash and (typically) save it in a session. This effectively provides basic "Log in with your ORCiD" functionality. - -Most likely, with the token in hand, you'll want to do something more sophisticated with the API, like retrieving profile data and do something cool with it. See the API guide for more details: - -http://support.orcid.org/knowledgebase/articles/116874-orcid-api-guide - +You have to implement a callback handler to grab at least the `uid` from the hash and (typically) save it in a session. This effectively provides basic **Log in with your ORCID** functionality. +Most likely, with the token in hand, you'll want to do something more sophisticated with the API, like retrieving profile data and do something cool with it. See the [API documentation](http://members.orcid.org/api/api-calls) for more details: Here's how to get going with a couple of popular Rack-based frameworks: ### Sinatra - Configure the strategy and implement a callback routine in your app: ```ruby @@ -85,7 +81,7 @@ require 'omniauth-orcid' enable :sessions use OmniAuth::Builder do - provider :orcid, ENV['ORCID_KEY'], ENV['ORCID_SECRET'] + provider :orcid, ENV['ORCID_CLIENT_ID'], ENV['ORCID_CLIENT_SECRET'] end ... get '/auth/orcid/callback' do @@ -94,7 +90,7 @@ get '/auth/orcid/callback' do end get '/' do - + if session[:omniauth] @orcid = session[:omniauth][:uid] end @@ -114,7 +110,7 @@ ruby demo.rb ``` -### Rails +### Rails Add this to `config/initializers/omniauth.rb` to configure the strategy: @@ -123,7 +119,7 @@ Add this to `config/initializers/omniauth.rb` to configure the strategy: require 'omniauth-orcid' Rails.application.config.middleware.use OmniAuth::Builder do - provider :orcid, ENV['ORCID_KEY'], ENV['ORCID_SECRET'] + provider :orcid, ENV['ORCID_CLIENT_ID'], ENV['ORCID_CLIENT_SECRET'] end ``` @@ -151,68 +147,35 @@ class AuthenticationsController < ApplicationController ## Configuration -You can also grab parameters from a config file (recommended) and pass -to the strategy, along with other options specific to your app. The OAuth scope or +You can also grab parameters from a environment variables (e.g. using the [dotenv](https://github.com/bkeepers/dotenv) gem) and pass to the strategy, along with other options specific to your app. The OAuth scope or scopes in particular frequently need to be customized. Here's an example from the bundled Sinatra app in `demo.rb`: -*UPDATE The [omniauth-oauth2 gem](https://github.com/intridea/omniauth-oauth2) was recently been updated to process options slightly differently. The `:scope` string must now be passed in via `:authorize_params`, see below* - ```ruby -config_file 'config.yml' use OmniAuth::Builder do - provider :orcid, settings.client_id, settings.client_secret, - :authorize_params => { - :scope => '/orcid-profile/read-limited' + provider :orcid, ENV['ORCID_CLIENT_ID'], ENV['ORCID_CLIENT_SECRET'], + authorize_params: { + scope: '/orcid-profile/read-limited' }, - :client_options => { - :site => settings.site, - :authorize_url => settings.authorize_url, - :token_url => settings.token_url + client_options: { + site: ENV['ORCID_URL'], + authorize_url: "#{ENV['ORCID_URL']}/oauth/authorize", + token_url: "#{ENV['ORCID_URL']}/oauth/token", } end ``` +Where `ENV['ORCID_CLIENT_ID']` and `ENV['ORCID_CLIENT_SECRET']` are provided by ORCID when registering the application, and `ENV['ORCID_URL']` depends on the API you are using (see above). -Different sets of params from `config.yml` are used for production environment (points to live ORCID service) vs. development environment (points to ORCID sandbox service). - -You can do something similar with in Rails with the same config file, or something . See a working example here: https://github.com/gthorisson/ORCID-example-client-app-rails - - - -## More information -* ORCID Open Source Project - https://github.com/ORCID/ORCID-Source -* Developer Wiki - https://github.com/ORCID/ORCID-Source/wiki -* Technical community - http://orcid.org/about/community/orcid-technical-community +## More information +* [ORCID Open Source Project](https://github.com/ORCID/ORCID-Source) +* [Developer Wiki](https://github.com/ORCID/ORCID-Source/wiki) +* [Technical community](http://orcid.org/about/community/orcid-technical-community) ## License -The MIT License (OSI approved, see more at http://www.opensource.org/licenses/mit-license.php) - -============================================================================= - -Copyright (C) 2012 by Gudmundur A. Thorisson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -============================================================================= +The [MIT License](license.txt) (OSI approved, see more at http://www.opensource.org/licenses/mit-license.php) ![Open Source Initiative Approved License](http://www.opensource.org/trademarks/opensource/web/opensource-110x95.jpg) diff --git a/config.yml b/config.yml deleted file mode 100644 index 5027491..0000000 --- a/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Default endpoint URLs for the ORCID OAuth API - - -production: - site: https://api.orcid.org - authorize_url: https://orcid.org/oauth/authorize - token_url: https://api.orcid.org/oauth/token - client_id: - client_secret: - -development: - site: http://api.devsandbox.orcid.org - authorize_url: http://devsandbox.orcid.org/oauth/authorize - token_url: http://api.devsandbox.orcid.org/oauth/token - client_id: - client_secret: diff --git a/demo.rb b/demo.rb index 9e4bb93..b2089dc 100644 --- a/demo.rb +++ b/demo.rb @@ -4,7 +4,6 @@ require 'rubygems' require 'sinatra' -require 'sinatra/config_file' require 'haml' require 'omniauth-orcid' require 'oauth2' @@ -13,22 +12,24 @@ enable :sessions use Rack::Session::Cookie -config_file 'config.yml' if development? puts "Sinatra running in development mode" elsif production? - puts "Sinatra running in production mode" + puts "Sinatra running in production mode" end puts "Connecting to ORCID API at " + settings.site + " as client app #{settings.client_id}" # Configure the ORCID strategy use OmniAuth::Builder do - provider :orcid, settings.client_id, settings.client_secret, - :client_options => { - :site => settings.site, - :authorize_url => settings.authorize_url, - :token_url => settings.token_url + provider :orcid, ENV['ORCID_CLIENT_ID'], ENV['ORCID_CLIENT_SECRET'], + authorize_params: { + scope: '/orcid-profile/read-limited' + }, + client_options: { + site: ENV['ORCID_URL'], + authorize_url: "#{ENV['ORCID_URL']}/oauth/authorize", + token_url: "#{ENV['ORCID_URL']}/oauth/token", } end @@ -38,7 +39,7 @@ get '/' do @orcid = '' - + if session[:omniauth] @orcid = session[:omniauth][:uid] end diff --git a/omniauth-orcid.gemspec b/omniauth-orcid.gemspec index a3221e6..238c965 100644 --- a/omniauth-orcid.gemspec +++ b/omniauth-orcid.gemspec @@ -2,10 +2,10 @@ require "date" require File.expand_path("../lib/omniauth-orcid/version", __FILE__) Gem::Specification.new do |s| - s.authors = ["Gudmundur A. Thorisson"] + s.authors = ["Gudmundur A. Thorisson", "Martin Fenner"] s.email = %q{gthorisson@gmail.com} s.name = "omniauth-orcid" - s.homepage = %q{https://github.com/gthorisson/omniauth-orcid} + s.homepage = %q{https://github.com/datacite/omniauth-orcid} s.summary = %q{ORCID OAuth 2.0 Strategy for OmniAuth 1.0} s.date = Date.today s.description = %q{Enables third-party client apps to connect to the ORCID API and access/update protected profile data } From cf0ae712876eb91c14590927bb09d381d61cd456 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 18:03:32 +0200 Subject: [PATCH 05/16] more standard lib layout --- lib/omniauth-orcid.rb | 3 +-- lib/omniauth/orcid.rb | 2 ++ lib/{omniauth-orcid => omniauth/orcid}/version.rb | 0 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 lib/omniauth/orcid.rb rename lib/{omniauth-orcid => omniauth/orcid}/version.rb (100%) diff --git a/lib/omniauth-orcid.rb b/lib/omniauth-orcid.rb index e77eb73..a4c4faa 100644 --- a/lib/omniauth-orcid.rb +++ b/lib/omniauth-orcid.rb @@ -1,2 +1 @@ -require "omniauth-orcid/version" -require 'omniauth/strategies/orcid' +require 'omniauth/orcid' diff --git a/lib/omniauth/orcid.rb b/lib/omniauth/orcid.rb new file mode 100644 index 0000000..897f205 --- /dev/null +++ b/lib/omniauth/orcid.rb @@ -0,0 +1,2 @@ +require "omniauth/orcid/version" +require 'omniauth/strategies/orcid' diff --git a/lib/omniauth-orcid/version.rb b/lib/omniauth/orcid/version.rb similarity index 100% rename from lib/omniauth-orcid/version.rb rename to lib/omniauth/orcid/version.rb From e8f114d69f68c9933185b5b539d4cd93618fc493 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 18:09:25 +0200 Subject: [PATCH 06/16] fix version detection --- lib/omniauth/orcid/version.rb | 2 +- omniauth-orcid.gemspec | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/omniauth/orcid/version.rb b/lib/omniauth/orcid/version.rb index 8005fd9..054913a 100644 --- a/lib/omniauth/orcid/version.rb +++ b/lib/omniauth/orcid/version.rb @@ -1,5 +1,5 @@ module OmniAuth - module ORCID + module Orcid VERSION = "0.6" end end diff --git a/omniauth-orcid.gemspec b/omniauth-orcid.gemspec index 238c965..e38e65e 100644 --- a/omniauth-orcid.gemspec +++ b/omniauth-orcid.gemspec @@ -3,16 +3,17 @@ require File.expand_path("../lib/omniauth-orcid/version", __FILE__) Gem::Specification.new do |s| s.authors = ["Gudmundur A. Thorisson", "Martin Fenner"] - s.email = %q{gthorisson@gmail.com} + s.email = ["gthorisson@gmail.com", "martin.fenner@datacite.org"] s.name = "omniauth-orcid" s.homepage = %q{https://github.com/datacite/omniauth-orcid} s.summary = %q{ORCID OAuth 2.0 Strategy for OmniAuth 1.0} s.date = Date.today s.description = %q{Enables third-party client apps to connect to the ORCID API and access/update protected profile data } - s.files = Dir["{lib}/**/*.rb", "bin/*", "LICENSE.txt", "*.md", "Rakefile", "Gemfile", "demo.rb", "config.yml", "omniauth-orcid.gemspec"] + s.files = Dir["{lib}/**/*.rb", "bin/*", "LICENSE.txt", "*.md", "Rakefile", "Gemfile", "demo.rb", "omniauth-orcid.gemspec"] s.require_paths = ["lib"] s.version = OmniAuth::ORCID::VERSION s.extra_rdoc_files = ["README.md"] + s.license = 'MIT' # Declary dependencies here, rather than in the Gemfile From 1b794c2706ecfd15019a765a048f1e3ce7bad740 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 18:12:07 +0200 Subject: [PATCH 07/16] fixed version path --- omniauth-orcid.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omniauth-orcid.gemspec b/omniauth-orcid.gemspec index e38e65e..1706cbf 100644 --- a/omniauth-orcid.gemspec +++ b/omniauth-orcid.gemspec @@ -1,5 +1,5 @@ require "date" -require File.expand_path("../lib/omniauth-orcid/version", __FILE__) +require File.expand_path("../lib/omniauth/orcid/version", __FILE__) Gem::Specification.new do |s| s.authors = ["Gudmundur A. Thorisson", "Martin Fenner"] From 7d4551e0b48ad161abeb000d6d4b4b2cdf23e229 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 18:13:11 +0200 Subject: [PATCH 08/16] fix constant name --- omniauth-orcid.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omniauth-orcid.gemspec b/omniauth-orcid.gemspec index 1706cbf..f576877 100644 --- a/omniauth-orcid.gemspec +++ b/omniauth-orcid.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.description = %q{Enables third-party client apps to connect to the ORCID API and access/update protected profile data } s.files = Dir["{lib}/**/*.rb", "bin/*", "LICENSE.txt", "*.md", "Rakefile", "Gemfile", "demo.rb", "omniauth-orcid.gemspec"] s.require_paths = ["lib"] - s.version = OmniAuth::ORCID::VERSION + s.version = OmniAuth::Orcid::VERSION s.extra_rdoc_files = ["README.md"] s.license = 'MIT' From 00401014819848c6fb0d17548016a7ad96be6f8d Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 18:15:19 +0200 Subject: [PATCH 09/16] version bump to 1.0 --- CHANGELOG.md | 4 ++-- lib/omniauth/orcid/version.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b7768..30214bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -## v0.7 (July 25, 2015) +## v.1.0 (July 25, 2015) -[onmiauth-orcid 0.7](https://github.com/lagotto/lagotto/releases/tag/v0.7) was released on July 25, 2015 with the following changes: +[onmiauth-orcid 1.0](https://github.com/lagotto/lagotto/releases/tag/v.1.0) was released on July 25, 2015 with the following changes: * changed default scope to `authenticate`, and use the public API `https://pub.orcid.org` by default. These settings work for non-members. * added `name` and `email` to the `info` hash returned by omniauth (`email` will be empty in almost all cases) diff --git a/lib/omniauth/orcid/version.rb b/lib/omniauth/orcid/version.rb index 054913a..89135bd 100644 --- a/lib/omniauth/orcid/version.rb +++ b/lib/omniauth/orcid/version.rb @@ -1,5 +1,5 @@ module OmniAuth module Orcid - VERSION = "0.6" + VERSION = "1.0" end end From c7ac232d2e03e35ecf0da3f26a168b035815fecb Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 18:25:06 +0200 Subject: [PATCH 10/16] added zenodo badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ee46c69..d4f0ce4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # OmniAuth ORCID +[![DOI](https://zenodo.org/badge/15088/datacite/omniauth-orcid.svg)](https://zenodo.org/badge/latestdoi/15088/datacite/omniauth-orcid) + ORCID OAuth 2.0 Strategy for the [OmniAuth Ruby authentication framework](http://www.omniauth.org). Provides basic support for connecting a client application to the [Open Researcher & Contributor ID registry service](http://orcid.org). From 548b30160494092176a85d1bf781b3f6224b607e Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 25 Jul 2015 18:35:27 +0200 Subject: [PATCH 11/16] fixed link in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30214bd..de9a1b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## v.1.0 (July 25, 2015) -[onmiauth-orcid 1.0](https://github.com/lagotto/lagotto/releases/tag/v.1.0) was released on July 25, 2015 with the following changes: +[onmiauth-orcid 1.0](https://github.com/datacite/omniauth-orcid/releases/tag/v.1.0) was released on July 25, 2015 with the following changes: * changed default scope to `authenticate`, and use the public API `https://pub.orcid.org` by default. These settings work for non-members. * added `name` and `email` to the `info` hash returned by omniauth (`email` will be empty in almost all cases) From 759db8ea75cf908005310b0dd01d80a4a994c6ac Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 27 Jul 2015 07:41:58 +0200 Subject: [PATCH 12/16] Fix deprecated rubygems source --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 0785713..90f129e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,10 @@ -source :rubygems +source 'https://rubygems.org' # Specify your gem's dependencies in omniauth-github.gemspec gemspec gem "omniauth-oauth2" -# These are development dependencies +# These are development dependencies gem "rake" #gem "rspec", "2.0.0.beta.8" From cfd4a9e4b8d8a1f01ea1f78a59bb5d320a083409 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 27 Jul 2015 07:43:05 +0200 Subject: [PATCH 13/16] Fix demo paths --- demo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo.rb b/demo.rb index b2089dc..4bbfa86 100644 --- a/demo.rb +++ b/demo.rb @@ -5,7 +5,7 @@ require 'rubygems' require 'sinatra' require 'haml' -require 'omniauth-orcid' +require_relative 'lib/omniauth-orcid' require 'oauth2' require 'json' From 794be864526319848c11102ae551086df144dbe8 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 27 Jul 2015 07:44:13 +0200 Subject: [PATCH 14/16] Ignore the Gemfile.lock --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6a3238a..ffeebfb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ spec/reports test/tmp test/version_tmp tmp +Gemfile.lock # YARD artifacts .yardoc From 89ee4fc357158c8df73c019ed4991979d02a1e54 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 27 Jul 2015 07:48:15 +0200 Subject: [PATCH 15/16] updated readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d4f0ce4..a2670ae 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Provides basic support for connecting a client application to the [Open Research Originally created for the [ORCID example client application in Rails](https://github.com/gthorisson/ORCID-example-client-app-rails), then turned into a gem. +This gem is used in the [DataCite-ORCID claiming tool](https://github.com/datacite/DataCite-ORCID) and the [Lagotto](https://github.com/lagotto/lagotto) open source application for tracking events around articles and other scholarly outputs. + +[GrowKudos](https://www.growkudos.com) is a web app where the gem is in active use. There's a free registration during which (and after which) an ORCID can be connected via oAuth. + ## Installation From 82cec7e2e15bb4e338e27d1ca6ecea8284f55a15 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 27 Jul 2015 07:48:41 +0200 Subject: [PATCH 16/16] version bump --- lib/omniauth/orcid/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/omniauth/orcid/version.rb b/lib/omniauth/orcid/version.rb index 89135bd..3cb621a 100644 --- a/lib/omniauth/orcid/version.rb +++ b/lib/omniauth/orcid/version.rb @@ -1,5 +1,5 @@ module OmniAuth module Orcid - VERSION = "1.0" + VERSION = "1.0.1" end end