omniauth-gov 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e8838d0aa21b42f3fd34e55119cd4e09b0b0a06f8f270b763eb89c02dcbc965
4
- data.tar.gz: feefa806757d036278f21b0631f43c49212ee2faa286297686ee04ab3155c308
3
+ metadata.gz: c6840a35099a1ca67e4d477aa22b010b3bfe6b3a774634002a4ecb21967e3f3c
4
+ data.tar.gz: 9769699d8ee31a1359fe1435bbdf2c6b39bc013ab28dac419d7f8716693bacc7
5
5
  SHA512:
6
- metadata.gz: 287b802208398e3bfbc99d560fb2402878a1029035d053ef0dd0dc75f1ed5c48c09f9ed12dabe8a2f25c89258d840e59dc15d88d6a2f22c58ffbaad0280cb009
7
- data.tar.gz: fe04c521d519f874bc91596dba667bfbd7dc12de4eab13a104067dfc24073767a6d1523e9785fab53e45e1354e3b94ee28e5e579e42c581cf84512d3920952dc
6
+ metadata.gz: b0856e71109b9cd2345d77e74e11e743ab9d8ce4c67aa5ef6762bfb75b24b5be88963a7b2645d2684ed3ecef62afede57eacb4eafedd4b56b07181f7e66710ac
7
+ data.tar.gz: 4848581c3d8029cba39e26cc803c42799664197daad6d0cae93c1480dc01fa62d0817501da16386ece9f858903b2ed93b6142667a3966bb49859be50c5ca4f56
data/README.md CHANGED
@@ -24,7 +24,12 @@ Em `config/initializers/devise.rb.rb`
24
24
  ENV['client_id'],
25
25
  ENV['client_secret'],
26
26
  scope: 'openid+email+profile+govbr_confiabilidades+',
27
- callback_path: '/callback-da-aplicacao'
27
+ callback_path: '/callback-da-aplicacao',
28
+ client_options: {
29
+ site: 'https://sso.acesso.gov.br', # Ambiente de produção.
30
+ authorize_url: 'https://sso.acesso.gov.br/authorize', # Ambiente de produção.
31
+ token_url: 'https://sso.acesso.gov.br/token' # Ambiente de produção.
32
+ }
28
33
 
29
34
  config.omniauth_path_prefix = '/prefixo-devise/prefixo-omniauth'
30
35
  end
@@ -34,7 +39,7 @@ Em `config/initializers/devise.rb.rb`
34
39
  Em `config/initializer/omniauth.rb`
35
40
 
36
41
  ```ruby
37
- OmniAuth.config.full_host = "<host-da-aplicacao-com-protocolo>"
42
+ OmniAuth.config.full_host = "https://endereco-do-app.gov.br"
38
43
  OmniAuth.config.logger = Rails.logger
39
44
  ```
40
45
 
@@ -121,6 +126,16 @@ devise :database_authenticatable,
121
126
 
122
127
  ```
123
128
 
129
+ ## View
130
+ Em `sessions/new.html.erb`
131
+ ```ruby
132
+ <%= button_to omniauth_authorize_path(resource_name, :gov), class: 'gov-br-btn sign-in br-button middle sign-in w-100 is-primary mt-3 mb-3', data: { turbo: false } do %>
133
+ <i class="icon fa fa-user fa-lg" style="color: rgb(255, 255, 255);"></i>&nbsp;
134
+ <span style="font-weight: normal;">Entrar com</span>&nbsp;
135
+ <span style="font-size: 20px; font-weight: bold;"> gov.br</span>
136
+ <% end %>
137
+ ```
138
+
124
139
  ## Licença
125
140
  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:
126
141
 
@@ -86,7 +86,4 @@ module Omniauth
86
86
  end
87
87
  end
88
88
 
89
- end
90
- end
91
-
92
89
  OmniAuth.config.add_camelization 'gov', 'Gov'
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Gov
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-gov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Ricardo