Skip to content

Commit

Permalink
Version 1.0 release
Browse files Browse the repository at this point in the history
### BREAKING CHANGES
- Renamed the main class from 'frejaeID' to new name 'phpFreja'
- Renamed the php file from 'frejaeID.php' to 'freja.php'
- Output from the checkSignatureRequest have changed

### Changed
- Included a fork from [php-jws](https://github.com/Gamegos/php-jws) in repo

### Added
- Added JWS validation as suggested by [#1](#1)
- PEM-files added for JWS validation
  • Loading branch information
DSorlov committed May 2, 2020
1 parent 17825b3 commit 3ca464b
Show file tree
Hide file tree
Showing 20 changed files with 948 additions and 313 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# phpFreja

Changelog for phpFreja.

The format is based on [Keep a Changelog][keep-a-changelog]
<!-- and this project adheres to [Semantic Versioning][semantic-versioning]. -->

## [Unreleased]
- Nothing right now

## [1.0] (2012-05-02)

### BREAKING CHANGES
- Renamed the main class from 'frejaeID' to new name 'phpFreja'
- Renamed the php file from 'frejaeID.php' to 'freja.php'
- Output from the checkSignatureRequest have changed

### Changed
- Included a fork from [php-jws](https://github.com/Gamegos/php-jws) in repo

### Added
- Added JWS validation as suggested by [#1](https://github.com/DSorlov/phpFrejaeid/issues/1)
- PEM-files added for JWS validation

## [0.1] (2019-10-14)

### Changed
- Initial releases

[keep-a-changelog]: http://keepachangelog.com/en/1.0.0/
[1.0]: https://github.com/DSorlov/phpFreja/releases/tag/v1.0
[0.1]: https://github.com/DSorlov/phpFreja
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

Simple PHP wrapper to talk to [Freja eID](https://frejaeid.com/en/developers-section/) [REST API](https://frejaeid.com/rest-api/Freja%20eID%20Relying%20Party%20Developers'%20Documentation.html) for use both in test and production enviroment.

- Supports validation of the JWS but requires external library for that part.
- Supports validation of the JWS but requires external library for that part (thanks to [php-jws](https://github.com/Gamegos/php-jws).
- Supports both directed and inferred authentication, for use with qr-code and app.
- Supports authentication and signature api but not the assertion service.
- Well behaved functions that do not throw (atleast not by design) but always return objects for simpler handling.
- Not developed, supported or endorsed by Verisec.

## Example

### Init connection to API (test)
```PHP
$testAuth = new frejaeID(getcwd().'/testCertificate.pfx','SuperSecretPassword',false);
$testAuth = new phpFreja(getcwd().'/testCertificate.pfx','SuperSecretPassword',false);
```
### Create URL for QR-Code
```PHP
Expand Down
11 changes: 11 additions & 0 deletions example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

require_once('freja.php');

$frejaApi = new phpFreja('certificate.pfx','CertificatePassword',false);

$result = $frejaApi->initAuthentication();

echo var_dump($result);

?>
Loading

0 comments on commit 3ca464b

Please sign in to comment.