def ssh_check_mic(self, mic_token, session_id, username=None):
self._session_id = session_id<EOL>self._username = username<EOL>if self._username is not None:<EOL><INDENT>mic_field = self._ssh_build_mic(<EOL>self._session_id,<EOL>self._username,<EOL>self._service,<EOL>self._auth_method,<EOL>)<EOL>self._gss_srv_ctxt.verify_mic(mic_field, mic_token)<EOL><DEDENT>else:<EOL><INDENT>self._gss_ctxt.verify_mic(self._session_id, mic_token)<EOL><DEDENT>
Verify the MIC token for a SSH2 message.

:param str mic_token: The MIC token received from the client
:param str session_id: The SSH session ID
:param str username: The name of the user who attempts to login
:return: None if the MIC check was successful
:raises: ``gssapi.GSSException`` -- if the MIC check failed