Proof-of-concept for webapp integration with Altinn.
- Ensure that you control at least one domain or subdomain which you register with the application
- Follow the instructions on how to register your application.
-
The application requires that the file
AccountControl/PrivateSettings.config
is added to the repo with the following content:<?xml version="1.0" encoding="utf-8" ?> <appSettings> <add key="ApiKeyTest" value="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" /> <add key="UserNID" value="{Norwegian_National_ID}"/> </appSettings>
-
Set
Origin
inAccountControl/Web.config
to a domain or subdomain supplied with in the registration. -
Deploy the application to Azure, configure SSL and enforce https only
The application will not work if Origin
is not set correctly, or if you deploy and configure Azure with another domain or subdomain than what is
given in origin or registrered with your application in Altinn. If you get the follwing error in the webclient console:
Failed to load https://tt02.altinn.no/api/my/messages: Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.xxxxxxxxx.no' is therefore not allowed access.
The response had HTTP status code 400.
Please follow the debugging tips supplied by Altinn.