https://github.com/kengu/account-control
Proof-of-concept for webapp integration with Altinn.
https://github.com/kengu/account-control
altinn asp-net-web-api
Last synced: 3 days ago
JSON representation
Proof-of-concept for webapp integration with Altinn.
- Host: GitHub
- URL: https://github.com/kengu/account-control
- Owner: kengu
- License: bsd-2-clause
- Created: 2018-10-13T09:05:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-14T23:35:47.000Z (over 7 years ago)
- Last Synced: 2025-02-21T19:26:59.208Z (over 1 year ago)
- Topics: altinn, asp-net-web-api
- Language: JavaScript
- Homepage:
- Size: 535 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AccountControl
==============
Proof-of-concept for webapp integration with Altinn.
Preparations
------------
1. Ensure that you control at least one domain or subdomain which you register with the application
2. Follow the instructions on [how to register your application](https://altinn.github.io/docs/guides/integrasjon/sluttbrukere/api/kom-i-gang/#registrer-din-applikasjon).
Setup
-----
1. The application requires that the file `AccountControl/PrivateSettings.config` is added to the repo with the following content:
```
```
2. Set `Origin` in `AccountControl/Web.config` to a domain or subdomain supplied with in the registration.
3. Deploy the application to Azure, configure SSL and enforce https only
Debugging
---------
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](https://altinn.github.io/docs/guides/integrasjon/sluttbrukere/api/kom-i-gang/#feilsøking).