omniauth-remote-user 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bfd7c0c67a089fb6fa483ae0435e979cab1a4d38
4
- data.tar.gz: a5a95d58c6692c0864e7ab732fd872b9203b1ad0
3
+ metadata.gz: 8dd824137a8e9bd71876e088ceb577e95d243283
4
+ data.tar.gz: 3a8b8245e16cbbe26e6dae68ba7fb518253b17af
5
5
  SHA512:
6
- metadata.gz: 82013bb49295bc35dd7acead92634f6f2dbebbd60b686c6e2c5a61aa22e125e1710de84fe892d5bb4f3c7b4b9f9cb064983dd8f8fcddd63df9a198aa08e72afd
7
- data.tar.gz: e91d77b0d6e9bc660585da0596f64a483cbc57152cc328b8e3710a986ae1a920528c25c1a20dec38df68599ccccdbfde1b2df9d4a793ab82f4b51c4e295eb3b5
6
+ metadata.gz: 931785e9e77573544b3612e42d9f77617568f6bd393c585f694f7c2d1bb14cc131e5d79811af4759d6abe34e7a65c1d80c2898e7de97e2ca3498a70d8769b682
7
+ data.tar.gz: b020d9030e2225464e81488dd7f62b6080d9caec84a71237e9ed0176c66f8758229c95176e7554ff6f6843bb7d6e75265cb46714c27106fd819c0922ea718b7e
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module RemoteUser
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -10,8 +10,8 @@ Gem::Specification.new do |gem|
10
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
- gem.files = `git ls-files -z`.split("\x0")
14
- gem.test_files = `git ls-files -- {test,spec,feature}/*`.split("\n")
13
+ gem.files = %w{Rakefile LICENSE.md README.md config.ru Gemfile} + Dir.glob("*.gemspec") +
14
+ Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
15
15
  gem.license = "Expat"
16
16
  gem.required_rubygems_version = '>= 1.3.5'
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-remote-user
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Kanashiro
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-03-05 00:00:00.000000000 Z
15
+ date: 2016-03-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: omniauth
@@ -39,8 +39,6 @@ executables: []
39
39
  extensions: []
40
40
  extra_rdoc_files: []
41
41
  files:
42
- - ".gitignore"
43
- - ".rspec"
44
42
  - Gemfile
45
43
  - LICENSE.md
46
44
  - README.md
@@ -51,10 +49,8 @@ files:
51
49
  - lib/omniauth/remote-user.rb
52
50
  - lib/omniauth/strategies/remote_user.rb
53
51
  - omniauth-remote-user.gemspec
54
- - references/teste.rb
55
52
  - spec/omniauth/strategies/remote_user_spec.rb
56
53
  - spec/spec_helper.rb
57
- - test_notes.txt
58
54
  homepage: http://beta.softwarepublico.gov.br/gitlab/softwarepublico/omniauth-remote-user
59
55
  licenses:
60
56
  - Expat
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- Gemfile.lock
6
- test/tmp
7
- test/version_tmp
8
- tmp
9
- *.swp
10
- coverage/
data/.rspec DELETED
@@ -1 +0,0 @@
1
- -c
@@ -1,29 +0,0 @@
1
- # references: http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTPHeader.html#method-i-add_field
2
- # import the netHTTP
3
- require 'net/http'
4
-
5
- # uri get the url http headers
6
- uri = URI('http://google.com')
7
-
8
- # new request and result the http_readers
9
- http_request = Net::HTTP::Get.new(uri)
10
-
11
- # o metodo each_header retorna um map com o nome do header e o conteudo
12
- http_request.each_header { |header,value| puts header + " " + value }
13
- #http_request.set_form_data({"REMOTE_USER" => "siqueira"})
14
- #http_request.set_form_data({"q" => "ruby", "lang" => "en"}, ';')
15
-
16
- ### add_field adicona um campo novo ou seja um novo HTTP_HEADER no nosso caso o REMOTE_USER
17
- http_request.add_field 'REMOTE_USER', 'siqueira'
18
-
19
- # Com o get_field podemos pegar o conteudo do header REMOTE_USER
20
- puts http_request.get_fields('REMOTE_USER')
21
-
22
- # => accept-encoding
23
- # => accept
24
- # => user-agent
25
- # => host
26
-
27
- http_response = Net::HTTP.start(uri.hostname, uri.port) do |http|
28
- http.request(http_request)
29
- end
@@ -1,27 +0,0 @@
1
- Configurando apache para setar header Remote-User:
2
-
3
- 1 - Instalar apache2
4
- 2 - Criar arquivo de configuração (ex: proxy.conf) em /etc/apache2/sites-available
5
-
6
- <VirtualHost *:80>
7
-
8
- ProxyPass / http://localhost:9292/
9
-
10
- RequestHeader set Remote-User "terceiro"
11
-
12
- ErrorLog ${APACHE_LOG_DIR}/error.log
13
- CustomLog ${APACHE_LOG_DIR}/access.log combined
14
-
15
- </VirtualHost>
16
-
17
- 3 - Habilitar site criado (a2ensite <conf>)
18
- 4 - Habilitar módulos (proxy, proxy-http, headers) utilizando o comando a2enmod
19
- 5 - Startar apache2 (service apache2 start)
20
-
21
- Referência:
22
- http://stackoverflow.com/questions/567814/apache2-reverse-proxy-to-an-end-point-that-requires-basicauth-but-want-to-hide-t
23
-
24
- Executando aplicação sinatra:
25
-
26
- 1 - Entrar no diretório que contem o arquivo conf.ru
27
- 2 - Executar aplicação (rackup)