Bugfix
Bugfix

No data about previous authentication is stored if authentication was not started at the SP (IdP-first flow). That makes the replay protection measures fail, leading to an ugly exception show to the user. Fix that.

Additionally, give precedence to the RelayState configured in the local metadata, as the one received together with the SAML response may not even be an URL.

This resolves #230.

shoaibali/simplesamlphp,cwaldbieser/simplesamlphp,maytechnet/simplesamlphp,gtkrug/simplesamlphp,sitya/simplesamlphp,dzuelke/simplesamlphp,gtkrug/simplesamlphp,jschlyter/simplesamlphp,madmatt/simplesamlphp,dzuelke/simplesamlphp,grnet/simplesamlphp,dnmvisser/simplesamlphp,maytechnet/simplesamlphp,simplesamlphp/simplesamlphp,sitya/simplesamlphp,madmatt/simplesamlphp,jschlyter/simplesamlphp,ghalse/simplesamlphp,cwaldbieser/simplesamlphp,shoaibali/simplesamlphp,dnmvisser/simplesamlphp,ghalse/simplesamlphp,BrettMerrick/simplesamlphp,cwaldbieser/simplesamlphp,dzuelke/simplesamlphp,simplesamlphp/simplesamlphp,BrettMerrick/simplesamlphp,ghalse/simplesamlphp,gtkrug/simplesamlphp,BrettMerrick/simplesamlphp,shoaibali/simplesamlphp,maytechnet/simplesamlphp,BrettMerrick/simplesamlphp,dnmvisser/simplesamlphp,dnmvisser/simplesamlphp,ghalse/simplesamlphp,sitya/simplesamlphp,grnet/simplesamlphp,simplesamlphp/simplesamlphp,sitya/simplesamlphp,cwaldbieser/simplesamlphp,shoaibali/simplesamlphp,madmatt/simplesamlphp,dzuelke/simplesamlphp,grnet/simplesamlphp,madmatt/simplesamlphp,gtkrug/simplesamlphp,jschlyter/simplesamlphp,jschlyter/simplesamlphp,jschlyter/simplesamlphp,maytechnet/simplesamlphp,grnet/simplesamlphp,simplesamlphp/simplesamlphp