Skip to content

Instantly share code, notes, and snippets.

View pmeulen's full-sized avatar

Pieter van der Meulen pmeulen

View GitHub Profile
@pmeulen
pmeulen / shibmd-1.0.xsd
Last active October 20, 2016 20:09
XML Schema for urn:mace:shibboleth:metadata:1.0 namespace
<?xml version="1.0" encoding="US-ASCII"?>
<schema targetNamespace="urn:mace:shibboleth:metadata:1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
version="1.0">
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
@pmeulen
pmeulen / accountgen.php
Created July 19, 2015 13:49
Generate user accounts for SimpleSAMLphp example-userpass
<?php
/*
$config: php config array
$group: account name prefix
$email: A pollibly existing email addres so you can receive mail
$scope: Used as schachome, EPPN scope and names
$count: number of accounts to generate
Example:
@pmeulen
pmeulen / SecureRandomPassword.php
Last active August 29, 2015 14:18
Generate a secure random password in the the "Base32" alphabet
<?php
// Generate a secure random password in the the "Base32" alphabet
// Uses openssl secure random function for RNG generation
// Because the set of characters has 32 = 2^5 distinct values, characters can be
// easily selected, without bias (i.e. each character has the same chance
// of being selected), by using 5 bits of randomness per character.
// Note: strlen(base32_alphabet) MUST be exactly 2^bits_per_value