Porting changes from picketlink2/federation.
Merge remote-tracking branch 'upstream/master'