Criipto, a Copenhagen-based company, offers advanced electronic identity (eID) solutions that provide secure user authentication and digital signatures. Integrating Criipto into your app simplifies the onboarding process, enhances security, and improves user experience.
This software instruction will guide you through the steps necessary to integrate Criipto's eID solutions into your app, offering clear instructions and best practices to ensure a smooth implementation!
What Is Criipto?
Criipto provides authentication services using national eID systems like BankID and NemID for secure user verification, digital signatures, and multi-factor authentication. Criipto solutions are used in finance, government, and healthcare solutions.
Who Needs Criipto Integration
Integrating Criipto's eID solutions into your app is crucial for various stakeholders who prioritize security, efficiency, and user experience. Here are some key groups that can greatly benefit from this integration:
Financial Institutions
Banks, credit unions, and other financial service providers need robust authentication methods to protect sensitive customer information and comply with regulatory requirements. Criipto's secure eID solutions streamline the onboarding process, allowing customers to quickly and securely access financial services without the typical bureaucratic delays.
Government Agencies
Government entities that handle personal data and provide online services can enhance security and trust by integrating Criipto's eID solutions. This integration helps verify the identity of users accessing sensitive information or completing official transactions, ensuring compliance with data protection laws and enhancing public trust in digital government services.
E-commerce Platforms
Online retailers and marketplaces that process transactions and store customer information can use Criipto to provide secure and smooth user authentication. This not only protects against fraud but also improves the overall shopping experience by enabling quick and secure sign-ins and checkouts.
Healthcare Providers
Hospitals, clinics, and telemedicine providers handling sensitive patient data can benefit from Criipto's eID solutions by ensuring that only authorized individuals can access health records and services. This integration supports compliance with healthcare regulations and enhances patient trust in digital health platforms.
Enterprises with Remote Workforce
Companies with remote employees need secure authentication solutions to protect access to corporate systems and data. Criipto's eID solutions provide a secure way for employees to authenticate their identity remotely, reducing the risk of unauthorized access and ensuring business continuity.
Legal and Professional Services
Law firms and professional service providers managing confidential client information can use Criipto to ensure secure client interactions and digital document signing. This not only safeguards sensitive data but also streamlines workflows and enhances client confidence in their digital services.
Product Discovery Lab
Free product discovery workshop to clarify your software idea, define requirements, and outline the scope of work. Request for free now.
How To Integrate Criipto Into Your App?
This guide will be oriented toward using the digital signature feature of Criipto.
Step 1. Registration in Criipto
First, you must sign up for the Criipto service and create an application. Registration is conducted through its website.
After that, in the left menu, navigate to the domains section.
Create a default domain using some unique name and proceed to the applications section.
Write the application name and select the domain created in the previous step.
In the next section, select all authentication methods that should be supported in your application.
After the creation of the application, copy and store the client ID and secret in a safe place.
Step 2. Integrate Criipto into your application
Criipto signature orders work through GraphQL requests, so ensure you can send HTTP requests.
For example, you can use graphql-java-kickstart library
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphql-webclient-spring-boot-starter</artifactId>
<version>2.0.1</version>
</dependency>
To work with Criipto, you need to configure the GraphQL client and provide client credentials in the header of every request.
@Bean
public GraphQLWebClient criiptoGraphQLWebClient(@Value("${criipto.url}") String url,
@Value("${criipto.client-id}") String clientId,
@Value("${criipto.client-secret}") String clientSecret,
@Autowired ObjectMapper objectMapper) {
final int size = 10 * 1024 * 1024;
final ExchangeStrategies strategies = ExchangeStrategies.builder()
.codecs(codecs -> codecs.defaultCodecs().maxInMemorySize(size))
.build();
var webClient = WebClient.builder()
.exchangeStrategies(strategies)
.baseUrl(url)
.defaultHeaders(header -> header.setBasicAuth(clientId, clientSecret))
.build();
return GraphQLWebClient.newInstance(webClient, objectMapper);
}
Now, create a test producer for signature orders. This producer will take a pdf file and send it to Criipto with information about signatories and webhook URL, to receive events related to signature order.
var input = new CreateSignatureOrderInput();
ClassLoader classLoader = Warmup.class.getClassLoader();
byte[] array;
try (var stream = classLoader.getResourceAsStream("photo.pdf")) {
array = stream.readAllBytes();
}
String blob = new String(Base64.getEncoder().encode(array));
input.getDocuments().add(new DocumentInput(new PadesDocumentInput("test document", blob, DocumentStorageMode.Temporary)));
input.getSignatories().add(new CreateSignatureOrderSignatoryInput("test company"));
input.setWebhook(new CreateSignatureOrderWebhookInput(WEBHOOK_URL));
input.getEvidenceProviders().add(new EvidenceProviderInput(new CriiptoVerifyProviderInput("key")));
input.setMaxSignatories(1);
Map<String, Object> variables = new HashMap<>();
variables.put("input", input);
var request = GraphQLRequest.builder()
.resource("createSignatureOrder.graphql")
.variables(variables)
.build();
var a = criiptoGraphQLWebClient.post(request).blockOptional();
After sending the request, you will receive a response with a signature URL that should be provided to signatories. You can find the URL in x.createSignatureOrder.signatureOrder.signatories[0].href
This URL will redirect you to the Criipto page with your PDF and sign options.
The signatory can choose the sign method by clicking on the bottom button. The available methods depend on which integration you pick on application creation in Step 1.
After signing a request to your webhook url will be sent. In the request body, you will see information about the signature, for example:
Conclusion
Thus, integrating Criipto allows secure authentication and document signing. In this study case, we outlined a basic integration of Criipto. However, there are other useful features of this technology, such as editing and signing orders, deleting orders, etc. Also, Criipto user authentication feature can be used as the main and secure auth provider in your application.
If you need a consultation on your project or integration case, don’t hesitate to contact us!