#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def add_oob_auth( self , stagetype , authdict , clientip ) : #NEWLINE# #INDENT# '\n        Adds the result of out-of-band authentication into an existing auth\n        session. Currently used for adding the result of fallback auth.\n        ' #NEWLINE# if ( stagetype not in self . checkers ) : #NEWLINE# #INDENT# raise LoginError ( 400 , '' , Codes . MISSING_PARAM ) #NEWLINE# #UNINDENT# if ( 'session' not in authdict ) : #NEWLINE# #INDENT# raise LoginError ( 400 , '' , Codes . MISSING_PARAM ) #NEWLINE# #UNINDENT# sess = self . _get_session_info ( authdict [ 'session' ] ) #NEWLINE# if ( 'creds' not in sess ) : #NEWLINE# #INDENT# sess [ 'creds' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# creds = sess [ 'creds' ] #NEWLINE# result = ( yield self . checkers [ stagetype ] ( authdict , clientip ) ) #NEWLINE# if result : #NEWLINE# #INDENT# creds [ stagetype ] = result #NEWLINE# self . _save_session ( sess ) #NEWLINE# defer . returnValue ( True ) #NEWLINE# #UNINDENT# defer . returnValue ( False )