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
-
Direct to Settings > Options > Authentication
-
Select one or more rows in the configurations table widget.
- Click on "Utilities" and select "export selected authentication configurations to file".
- When prompted for a password, leave it blank.
Warning
You will be warned that you might be leaking sensitive information, which is a good reminder to treat the resulting XML with caution.
Importar configuraciones de autenticación a QField¶
Preparación en escritorio
Para que un servicio que requiere autenticación se ejecute en QField, después de configurar las credenciales requeridas en QGIS, la información también debe agregarse en QField.
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.