Merge Request #2

Merged
softwarepublico/omniauth-remote-user!2
Created by Thiago Ribeiro

Gitlab integration

Quick changes beacuse:

  • New heder name for user data.
  • Publish gem.
Assignee: Antonio Terceiro
Milestone: None

Merged by Antonio Terceiro

Source branch has been removed
Commits (2)
3 participants
Rakefile
1 1 require 'bundler'
2 2 Bundler::GemHelper.install_tasks
3 3  
4   -require 'rspec/core/rake_test'
5   -desc "Run specs."
6   -RSpec::Core::RakeTask.new(:spec)
7 4  
8 5 task :default => :spec
9 6 task :test => :spec
... ...
lib/omniauth-remote-user/version.rb
1 1 module Omniauth
2 2 module RemoteUser
3   - VERSION = '0.0.1'
  3 + VERSION = '0.0.4'
4 4 end
5 5 end
... ...
lib/omniauth/strategies/remote_user.rb
... ... @@ -70,7 +70,7 @@ module OmniAuth
70 70 end
71 71  
72 72 info do
73   - user_data = request.env['HTTP_REMOTE_USER_DATA']
  73 + user_data = request.env['X_REMOTE_USER_DATA']
1
  • 9fe63c7bd60deeb55e409a1d7dd173f5?s=40&d=identicon
    Sergio Oliveira @seocam

    I believe the header name should come with the prefix HTTP_ still. Actually that's something the CGI handler will add to all (or mostly) the headers. Am I right @terceiro?

    Choose File ...   File name...
    Cancel
74 74 if user_data
75 75 data = JSON.parse(user_data)
76 76 data['nickname'] = uid
... ...
omniauth-remote-user.gemspec
... ... @@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7 7 gem.description = 'Authentication with Remote-User HTTP header for Omniauth.'
8 8 gem.summary = 'Authentication with HTTP Remote User'
9 9 gem.email = ['kanashiro.duarte@gmail.com', 'thiagitosouza@gmail.com', 'rodrigosiqueiramelo@gmail.com','macartur.sc@gmail.com','terceiro@softwarelivre.org']
10   - gem.homepage = 'http://beta.softwarepublico.gov.br/gitlab/softwarepublico/omiauth-remote-user'
  10 + gem.homepage = 'http://beta.softwarepublico.gov.br/gitlab/softwarepublico/omniauth-remote-user'
11 11 gem.authors = ['Lucas Kanashiro', 'Thiago Ribeiro', 'Rodrigo Siqueira','Macartur Sousa', 'Antonio Terceiro']
12 12 gem.require_paths = %w(lib)
13 13 gem.files = `git ls-files -z`.split("\x0").reject {|f| f.start_with?('spec/')}
... ...
  • 75e3b052e046e34cbb10917c5f9901d7?s=40&d=identicon
    Antonio Terceiro @terceiro

    make sure to tag the exact version you publish to rubygems

    Choose File ...   File name...
    Cancel
  • 800e3af93350753db9dee1864cef10ff?s=40&d=identicon
    Thiago Ribeiro @thiago

    Ok, that's really a good pratice. Done.

    Choose File ...   File name...
    Cancel
  • 9fe63c7bd60deeb55e409a1d7dd173f5?s=40&d=identicon
    Sergio Oliveira started a discussion on the diff
    last updated by Sergio Oliveira
    lib/omniauth/strategies/remote_user.rb
    70 70 end
    71 71  
    72 72 info do
    73   - user_data = request.env['HTTP_REMOTE_USER_DATA']
      73 + user_data = request.env['X_REMOTE_USER_DATA']
    1
    • 9fe63c7bd60deeb55e409a1d7dd173f5?s=40&d=identicon
      Sergio Oliveira @seocam

      I believe the header name should come with the prefix HTTP_ still. Actually that's something the CGI handler will add to all (or mostly) the headers. Am I right @terceiro?

      Choose File ...   File name...
      Cancel
  • 800e3af93350753db9dee1864cef10ff?s=40&d=identicon
    Thiago Ribeiro @thiago

    @seocam I believe you're right , when this change will be in colab ? We will test as soon as possible .

    Choose File ...   File name...
    Cancel
  • 9fe63c7bd60deeb55e409a1d7dd173f5?s=40&d=identicon
    Sergio Oliveira @seocam

    @thiagitosouza feel free to send a MR! ;)

    Choose File ...   File name...
    Cancel