3.2.5.6 Sent LOGIN7 Record with Federated Authentication Information Request State

If the response received from the server contains a structurally valid Login Response message that contains a Routing ENVCHANGE token in the response after the LOGINACK token, the TDS client MUST enter the "Routing Completed" state.

If the response received from the server contains a structurally valid Login Response message that contains a FEDAUTHINFO token, the TDS client MUST generate a Federated Authentication message, send that Federated Authentication message to the server, and enter the "Sent LOGIN7 record with Complete Authentication Token" state.

If the response received from the server does not contain a structurally valid Login Response message that contains a routing response or a structurally valid FEDAUTHINFO token, the TDS client MUST close the underlying transport connection, indicate an error to the upper layer, and enter the "Final State" state.