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 +4 -4
- data/README.md +17 -2
- data/lib/omniauth/strategies/gov.rb +0 -3
- data/lib/omniauth-gov/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6840a35099a1ca67e4d477aa22b010b3bfe6b3a774634002a4ecb21967e3f3c
|
4
|
+
data.tar.gz: 9769699d8ee31a1359fe1435bbdf2c6b39bc013ab28dac419d7f8716693bacc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = "
|
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>
|
134
|
+
<span style="font-weight: normal;">Entrar com</span>
|
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
|
|
data/lib/omniauth-gov/version.rb
CHANGED