Sample application
A sample Fortress client application is provided to help developers to integrate third-party apps with Viafirma Fortress. This basic web application shows how to use the main API services:
- Retrieve user information (to check if it has active certificates and IDPs).
- User authentication.
- Authorization request to sign a document.
- PAdES and XAdES signature.
- Batch signature.
Prerequisites
Quickstart
The sample application is based on Spring Boot and includes an embedded Tomcat server to simplify the execution.
- The app can be imported in any IDE and execute
com.viafirma.fortress.demo.FortressDemoApplication
class. - The app can also be started running
mvn spring-boot:run
. - The app can also be compiled and packaged running
mvn clean package
and deploy the resulting WAR file in a Tomcat web server or even run it:
java -jar target/viafirma-fortress-demo.war
Testing the application
Once the application has started, the main page is accesible in any web browser:
http://localhost:8080/fortress-demo/
it is also available in the sandbox environment:
https://sandbox.viafirma.com/fortress-demo/
Login screen
The first interface (login screen) is just used to get Fortress user code. Please enter a valid user code (for instance, 12345678Z
) and any password (it will not be checked). If the user code does not exist, user will not be able to check authentication or digital signature with a centralized digital certificate.
Main screen
If the entered user has certificates / IDPs associated, authentication and signing buttons are enabled, with different options to sign documents: PDF (PAdES), XML (XAdES) or batch signature.
User authentication
Test user 12345678Z
can be used, with PIN IDP 1234
and OTP (soft token) IDP based on Google Authenticator, scanning the attached QR Code:
results matching ""
No results matching ""