Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EID and SVM login #475

Open
wants to merge 209 commits into
base: master
Choose a base branch
from
Open

EID and SVM login #475

wants to merge 209 commits into from

Conversation

mirrec
Copy link
Collaborator

@mirrec mirrec commented Apr 7, 2022

Riesi:

#471

Progress:

  • Pridat Tlacitko: Login s EID (odchod na slovensko.sk)
  • Uspesne prihlasenie na stranke slovensko.sk (pride request na localhost:3000)
  • Overit, ze JWT token je validny (public key cez ENV jano)
    • Poriesit case, ked JWT token nie je validny
  • Nacitavat field sub: rc://sk/123214324_priezvisko_meno z udajov, co mi prisli
    • Do buducna pridat do udajov field actor (mala by byt fyzicka osoba), a tento udaj sa nasledne bude citat
  • Byt schopny povedat, ci dany sub ma ucet
    • Pridat field do DB pre User model, kde budem mat eid_actor
    • Index
    • Find function
  • Ak user ucet podla eid_actor mame
    • Prihlasime pouzivatela
  • Ak ucet nemame, user zadava email
    • Zadat email cez formular
    • Server posle email s magic linkou
    • User klikne na magic link
    • Vytvorenie usera (ak nebol), a setnutie eid_actor fieldu
    • Prihlasenie pouzivatela

@jsuchal
Copy link
Member

jsuchal commented May 4, 2022

@alhafoudh tuto je extremne dolezite vyriesit aj scenar, ze sa odhlasujeme. Musi sa odhlasit aj na slovensko.sk @luciajanikova vie detaily.

def parse_eid_expires_at(token)
Time.zone.at(parse_eid_token(token)&.first&.fetch('exp'))
end

def parse_eid_token(token)
if Rails.env.development?
JWT.decode(token, nil, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto ale musime overit ci to je validne a vsetko, inak ti podhodim token s hocijakym sub, nepodpisany.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ved nizsie je overenie

martyciz and others added 4 commits June 24, 2022 19:25
* master: (24 commits)
  bumped gemfile lock (#474)
  delete images from repo (#484)
  Check if this works
  Check if this works
  Update gh actions to push code to gitlab (#480)
  Freeze devcontainer ruby version and add missing js deps install (#472)
  ND-96 Upload obrázkov(súborov) na amazon (#468)
  #392 Generate automatic slug for Page, Journey, Step and App
  test precompile assets
  test precompile assets
  test precompile assets
  test precompile assets
  test precompile assets
  test precompile assets
  test precompile assets
  test precompile assets
  test precompile assets
  precompile assets
  edit migrate command
  precompile assets
  ...

# Conflicts:
#	Gemfile
#	db/structure.sql
@alhafoudh alhafoudh changed the title Eid login - WIP EID and SVM login Jun 24, 2022
tom-m and others added 26 commits July 12, 2023 09:17
…ge (#588)

Without this the rails/webdrivers installation into mcr.microsoft.com/vscode/devcontainers/base:bullseye fails with:

make DESTDIR\= sitearchdir\=./.gem.20230627-76-qe4u9x sitelibdir\=./.gem.20230627-76-qe4u9x install
make: /usr/bin/mkdir: No such file or directory

Co-authored-by: Marek Ceľuch <[email protected]>
* Fix voting subscription

* Fix tests
* enable ziadost o volebny preukaz

* update vote preukaz

* use google spreadsheets api v4 getting municipality emails

* minor style fix in vote app

* show email template even when email is present and show municipality email address

* update municipality form

* update municipality form

* update municipality form 3

* fix municipality form

* use new spreadsheet for municipality emails
* replace n with rn and fix typo in email subject

* fix tests

* bump ruby and some gems to fix tests
* start tests

* test progress

* tests wip

* add upvs submission spec

* rm upvs_submissions factory

* add datahub db to tests

* fix upvs submission model spec

* add test env value for sk api url to GH workflow
Bumps [puma](https://github.com/puma/puma) from 6.1.1 to 6.3.1.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](puma/puma@v6.1.1...v6.3.1)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jano Suchal <[email protected]>
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jano Suchal <[email protected]>
* use env variables for parliament vote app dates

* fix syntax

---------

Co-authored-by: Jano Suchal <[email protected]>
…digital into update_seeds

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Add missing seeds & Update existing
…digital into update_seeds

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
* Add tests for category detail

---------

Co-authored-by: Jano Suchal <[email protected]>
Co-authored-by: Jan Suchal <[email protected]>
* Add onboarding modal, refs #331
* Improved healtcheck, which checks if the app is running and also if the connections to databases are established

* Modified healthcheck test to include databases checks

* health_spec test includes coverage for negative scenarios, modified the index of health_controller
* add is number validation to vote app

* fix syntax

* fix: go back button (#622)

* added Go Back button to pages where missing
* fix: test in spec/features/apps/parliament_vote_app_spec.rb

* add ux tweaks and rewords based on ux recommendations

* add president_vote_app

* udpate date calculation in president vote app

* change president election app email addresses sheet

* disable birth number validation

* use checkboxes instead of radios on place selection

* update president app after testing

* minor wording update

* add minor text hint to place selection

* revert unwanted changes

* rm email client button from auth person send

* add tests and refactor a bit

* rm unused code

* magically fix parliament vote app tests

* make checkbox labels clickable

* fix conditionally revealing address option

---------

Co-authored-by: zuzana <[email protected]>
@cizmarty cizmarty self-assigned this Apr 26, 2024
private

def parse_given_link(given_url)
prefix = Regexp.escape(legal_link_prefix).gsub("/", "\\/")

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This does not escape backslash characters in the input.
reset_session

redirect_to root_path, notice: 'Odhlásenie bolo úspešné.'
if params[:callback].present?
redirect_to params[:callback]

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.