# Obtenção e configuração das credenciais para o login único GOVBR

## **<span style="font-size: 21.0pt; font-family: 'Arial',sans-serif; mso-fareast-font-family: 'Times New Roman'; color: #404040; mso-font-kerning: 18.0pt; mso-fareast-language: PT-BR;">Obtenção e configuração das credenciais para o login único GOVBR</span>**

<span style="font-size: 12.0pt; line-height: 150%; font-family: 'Arial',sans-serif;">As credenciais de acesso para o login único via GOVBR podem ser obtidas enviando o documento referente ao plano de integração da instituição para o ministério da economia. Em seguida as credenciais são utilizadas na configuração dos parâmetros de funcionamento do sistema Polare.</span>

[![image.png](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/scaled-1680-/M3xih7o9BZgq2N7x-image.png)](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/M3xih7o9BZgq2N7x-image.png)

#### **<span style="font-size: 16.0pt; line-height: 107%; font-family: 'Arial',sans-serif;">Plano de Integração</span>**

<span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif; color: #404040; background: #FCFCFC;">A documentação referente a obtenção das credenciais para o login único GOVBR pode acessada no </span>*<span style="font-family: 'Arial',sans-serif;">link</span>*<span style="font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; word-spacing: 0px;"> a seguir:</span>

<span style="font-family: 'Arial',sans-serif;">[<span style="color: #2980b9; background: #FCFCFC; text-decoration: none; text-underline: none;">https://manual-roteiro-integracao-login-unico.servicos.gov.br/pt/stable/solicitarconfiguracao.html#solicitacao-de-configuracao</span>](https://manual-roteiro-integracao-login-unico.servicos.gov.br/pt/stable/solicitarconfiguracao.html#solicitacao-de-configuracao)</span>

<span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif;">Clique </span>[![image.png](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/scaled-1680-/3kbqaQzEyMlLvQcs-image.png)](https://polare-install-docs.readthedocs.io/en/latest/_downloads/ef956ceaf4667329629253c175d4984e/integracao-polare-govbr-homologacao-template.docx)<span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif;"> para obter um modelo de documento pré-preenchido para facilitar a obtenção das credenciais.</span>

<span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif; color: #404040; background: #FCFCFC;">É necessário assinar o documento digitalmente antes de enviá-lo por e-mail. O assinador utilizado foi o do GOVBR:</span>

<span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif; color: #404040; background: #FCFCFC;">[https://assinador.iti.br/assinatura/index.xhtml](https://assinador.iti.br/assinatura/index.xhtml)</span>

[![image.png](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/scaled-1680-/PACmfZHjx7SB3iYy-image.png)](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/PACmfZHjx7SB3iYy-image.png)

#### **<span style="font-size: 16.0pt; line-height: 107%; font-family: 'Arial',sans-serif;">Configuração</span>**

<span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif; color: #404040; background: #FCFCFC;">As credenciais de acesso (</span>*<span style="font-family: 'Arial',sans-serif;">client\_id</span>*<span style="font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; word-spacing: 0px;"> e *<span style="font-family: 'Arial',sans-serif;">secret</span>*<span style="font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; word-spacing: 0px;">) precisam ser definidas nos parâmetros de configuração do sistema do Polare. Nesta documentação, os parâmetros de configuração estão definidos no arquivo </span><span class="pre"><span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif; color: #e74c3c; border: solid #E1E4E5 1.0pt; mso-border-alt: solid #E1E4E5 .75pt; padding: 2.0pt; background: white;">catalina.sh</span></span></span><span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif; color: #404040; background: #FCFCFC;"><span style="font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; word-spacing: 0px;">. Detalhe para as linhas 2 e 3 no trecho de código a seguir:</span></span>

```
# configuração GOVBR
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.registration.govbr.client-id=ALTERAR" # ALTERAR
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.registration.govbr.client-secret=ALTERAR" # ALTERAR
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.registration.govbr.scope=openid+\(email/phone\)+profile+govbr_empresa+govbr_confiabilidades"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.registration.govbr.authorization-grant-type=authorization_code"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.registration.govbr.redirect-uri=http://ALTERAR/polare/login/oauth2/code/govbr" # ALTERAR
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.provider.govbr.authorization-uri=https://sso.staging.acesso.gov.br/authorize"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.provider.govbr.token-uri=https://sso.staging.acesso.gov.br/token"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.provider.govbr.jwk-set-uri=https://sso.staging.acesso.gov.br/jwk"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.provider.govbr.user-info-uri=https://sso.staging.acesso.gov.br/userinfo"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.security.oauth2.client.provider.govbr.user-name-attribute=name"
CATALINA_OPTS="$CATALINA_OPTS -Dapp.auth.logout.govbr.logout-uri=https://sso.staging.acesso.gov.br/logout?post_logout_redirect_uri=http://ALTERAR/polare" # ALTERAR
```

[![image.png](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/scaled-1680-/M58VgNcUs8C7cimH-image.png)](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/M58VgNcUs8C7cimH-image.png)

[![image.png](https://base.ifpa.edu.br/uploads/images/gallery/2023-07/scaled-1680-/JMLqDPlSQTn93qAw-image.png)](https://server.ethicalads.io/proxy/click/1641/53dbe044-5752-4ba6-9117-f58d50dac6a3/)

<span style="font-family: 'Arial',sans-serif; color: gray;">© Copyright 2023, UFRN/IFPA. <span class="commit"><span style="box-sizing: border-box;">Revision </span>`<span style="mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; font-family: 'Arial',sans-serif; border: none windowtext 1.0pt; mso-border-alt: none windowtext 0cm; padding: 0cm;">ce91cf46</span>`.</span></span>

<span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif; color: gray; background: #FCFCFC;">Built with </span><span style="font-size: 12.0pt; line-height: 107%; font-family: 'Arial',sans-serif;">[<span style="color: #2980b9; background: #FCFCFC; text-decoration: none; text-underline: none;">Sphinx</span>](https://www.sphinx-doc.org/)<span style="color: gray; background: #FCFCFC;"><span style="font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; word-spacing: 0px;"> using a </span></span>[<span style="color: #2980b9; background: #FCFCFC; text-decoration: none; text-underline: none;">theme</span>](https://github.com/readthedocs/sphinx_rtd_theme)<span style="color: gray; background: #FCFCFC;"><span style="font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; word-spacing: 0px;"> provided by </span></span>[<span style="color: #2980b9; background: #FCFCFC; text-decoration: none; text-underline: none;">Read the Docs</span>](https://readthedocs.org/)<span style="color: gray; background: #FCFCFC;"><span style="font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; word-spacing: 0px;">.</span></span></span>