Service-initiated MFA using SAML 2.0ΒΆ

When using SAML 2.0 the service will need to send a saml:AuthnContextClassRef element as part of the authentication request:

<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
  <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" AllowCreate="true" />

If the service uses SimpleSAMLphp this can be done using the saml:AuthnContextClassRef parameter at the start of authentication like so:

  'saml:AuthnContextClassRef' => '',

After authentication the service should check the eduPersonAssurance attribute in the response to verify the authentication level. Note that when using SAML 2.0 the response will contain an error if the user has no way of using MFA.