Library to do auth against

1.4.0 2021-07-06 11:47 UTC


Library to make it easier to handle logging in with

To get started with Identification and Authentication Services (IAS) you'll need to apply:

How it works

The token the Í IAS returns to the service provider(you), for decoding by the service provider, is a digitally signed SAML 2 token encoded in Base 64 and UTF-8.

The SAML message returned by IAS will be digitally signed with a certificate issued by Traustur bunadur. Furthermore, the message will have been transformed with xml-exc-c14n, prior to being digested with SHA256 and signed with a 2048-bit RSA key.

This library helps with validating and verifying the SAML token, and the provided signature.

If you want more information about how this work you can read the technical specification here:


composer require stefna/islandis-auth


Example usage

if (isset($_POST['token'])) {
	$audienceUrl = '';
	$authentication = new Islandis\Authenticate(new \Islandis\Verifier($audienceUrl));
	try {
		$user = $authentication->verify($_POST['token']);
		$kennitala = $user->getKennitala();
		//is authenticated
	} catch (\Islandis\Exception\AuthenticateError $e) {
		echo $e->getMessage();
		//failed  authentication


We are always happy to receive bug/security reports and bug/security fixes