GithubHelp home page GithubHelp logo

kolplattformen / embedded-api Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 16.0 1.04 MB

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

JavaScript 7.08% TypeScript 92.92%

embedded-api's People

Contributors

believer avatar dependabot[bot] avatar edenstrom avatar erikhellman avatar grishund avatar irony avatar johanobrink avatar kajetan-kazimierczak avatar nisseboman avatar peterorneholm avatar rrostt avatar viktorlarsson avatar whyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

embedded-api's Issues

Use testdata for personal identity number

Fake user

Login with personal number 12121212121212, 201212121212 or 1212121212 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:

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.

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.

Add saved cookie as parameter in init

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.

Android login bugg

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

Get details for each newsItem

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)

bug: 🐛 News parsing

Datum parsas fel. News laddas inte

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.