Skip to content

jubi91/smart-id-php-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart-ID Relying Party PHP Api Demo

This application illustrates how to implement logging in with Smart-ID on a PHP based app.

Setup

Demo has an easy Docker setup. You don't need to download/export repository yourself but bare in mind that this approach always clones the app code from Github. If you want to make changes and see them in effect you have to first push the changes to your own forked repo in Github to have the script clone from there.

  1. Install Docker
  2. Either clone the whole repo or only copy docker-compose.yml and docker directory from repository to local directory
  3. If you want to run a forked repo then add your git username into variable GIT_USERNAME in docker/setup.sh
  4. Open command-line in that directory and run following commands:
  • docker-compose build --force-rm
  • docker-compose up

Once the script completes the install (takes several minutes) you should have demo application available at http://localhost:32080. Keep the browser's Developer's console Network tab open to the requests arriving from back-end.

You can now log in with test accounts listed in smart-id-documentation wiki. Keep in mind that the demo application is configured to allow only to log in users who have QUALIFIED certificate level. To also allow users with ADVANCED (which is weaker than QUALIFIED) certificate level one needs to update backend/app/app.php and set 'certificate_level' => 'ADVANCED'.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 60.0%
  • HTML 17.4%
  • PHP 12.0%
  • JavaScript 9.3%
  • Other 1.3%