Autenticación¶
QField permite la conexión a servicios que requieren autenticación de acceso. Esta página mostrará ejemplos de autenticación y mostrará cómo exportar la configuración de autenticación de QGIS a QField.
Servicios web protegidos por OAuth2 en QGIS¶
Preparación en escritorio
Para cargar correctamente capas protegidas con OAuth2 en QField, estas capas deben estar configuradas para usar OAuth2 en QGIS. Para configurar un WFS con OAuth2 en QGIS, siga estos pasos.
Flujo
- Direct to Layer > Add Layer > Add WFS / OGC API Feature Service
- Click on "New" or "edit" your existing service.
- Add a new authentication type by clicking the green cross and adjust the parameters to match your OAuth2 server setup.
- Once the layer's authentication configuration is set, add some layers into your project to test that they are rendering correctly.
Exportar configuraciones de autenticación desde QGIS¶
Preparación en escritorio
Antes de exportar configuraciones de autenticación, siempre es bueno verificar que pueda conectarse correctamente a los servicios relevantes utilizando QGIS.
Flujo
-
Vaya a Configuración > Opciones > Autenticación
-
Seleccione una o más filas en el widget de la tabla de configuraciones.
- Haga clic en "Utilidades" y seleccione "Exportar las configuraciones de autenticación seleccionadas a un archivo".
- Cuando se le solicite una contraseña, déjela en blanco.
Advertencia
Se le advertirá que podría estar filtrando información confidencial, lo cual le recuerda que debe tratar el XML resultante con precaución.
Importar configuraciones de autenticación a QField¶
Preparación en escritorio
In order for a service that requires authentication to run in QField, after configuring the required credentials in QGIS, the information needs to be added into QField as well.
Flujo
- Export the authentication configuration file from QGIS (see above)
- On your device direct to the QField App Directory > Auth
- Once copied, the service should be rendered correctly and provide access.
Tip
For authentication methods requiring user input such as OAuth2, QField will provide a browser or dialog to prompting for the required details such as user, password, or 2-step authentication code.