kolplattformen / embedded-api Goto Github PK
View Code? Open in Web Editor NEWSince the proxy was blocked (and also deemed a bad idea by some), this is a reboot of the API running in process in the app(s).
License: Apache License 2.0
Since the proxy was blocked (and also deemed a bad idea by some), this is a reboot of the API running in process in the app(s).
License: Apache License 2.0
Fake user
Login with personal number
12121212121212
,201212121212
or1212121212
and
api will be put into fake mode.
Static data will be returned and no calls to backend will be made.
For testing purposes, thsese numbers are used:
12121212121212
(https://swedish.identityinfo.net/personalidentitynumber/validate?number=12121212121212)201212121212
(https://swedish.identityinfo.net/personalidentitynumber/validate?number=201212121212)1212121212
(https://swedish.identityinfo.net/personalidentitynumber/validate?number=1212121212)While the first one is not a valid number (to long), the other two ones are. Because of this, there might pe users who cannot log in (5 years until they can have BankID, but still..) and we might use someone's real identity in our fake data.
For this exact purpose, Swedish the tax authorities (Skatteverket) have issued a list of reserved personal identity numbers (personnummer) we could use. They will be valid ones - but guaranteed not to be used by any real person.
I'd suggest we replace them with these numbers. Changing to people ~35 years old, as I (guess?) it is the parents that login.
198611239883
(https://swedish.identityinfo.net/personalidentitynumber/validate?number=198611239883)8501139995
(https://swedish.identityinfo.net/personalidentitynumber/validate?number=8501139995)8412099296
(https://swedish.identityinfo.net/personalidentitynumber/validate?number=8412099296)The source of this dataset can be found here:
*Disclaimer: * I'm the author of the site https://swedish.identityinfo.net/ reffered to abvove. It builds on the publically available datasets from Skatteverket.
When debugging, it is very cumbersome to always have to login via BankID - if we add const api = init(fetch, savedCookie)
we can initialise the lib directly with the previous cookie saved in localstorage.
Kanske är känt men när jag testar verkar problemet vara anropet till
https://etjanst.stockholm.se/vardnadshavare/inloggad2/hem
som ger 500.
Det som verkar få servern att krascha är att cookien: StockholmEServiceLanguage skickas i konstigt format:
Set-Cookie: StockholmEServiceLanguage=1053,Svenska,Language,sv; expires=Tue, 22-Mar-2022 23:49:19 GMT; path=/
(det konstiga är , mellan språken)
Det gör Androids cookie-hantering förvirrad och skickar följande cookie(s) i nästa anrop:
StockholmEServiceLanguage=1053; Svenska=; Language=; sv=
dvs som tre cookies (; är separator mellan cookies)
Om man tar bort de konstiga cookies:en så funkar anropet som vanligt och svarar med 200.
Ping @ErikHellman @JohanObrink
The news body contains links and images that needs authTokens so before parsing the html to markdown we have to download the news item from the following url. Here we also get details about author and dates etc so I think we can do this directly, or with a switch in the getNews(childId, downloadDetails: boolean)?
/vardnadshavare/inloggad2/News/GetNewsArticle?newsItemId=${newsId}&childId=${childId)
Nyheter kraschar när något av datumfälten har fel format.
I vår skola används t.ex. formatet "2 oktober 2020 11:35" och liknande.
Line 22 in aace2d2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.