#NEWLINE# def authz_part2( self , user , areq , sid , **kwargs ) : #NEWLINE# #INDENT# result = self . _complete_authz ( user , areq , sid , ** kwargs ) #NEWLINE# if isinstance ( result , Response ) : #NEWLINE# #INDENT# return result #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( aresp , headers , redirect_uri , fragment_enc ) = result #NEWLINE# #UNINDENT# if ( 'check_session_iframe' in self . capabilities ) : #NEWLINE# #INDENT# salt = rndstr ( ) #NEWLINE# state = str ( self . sdb . get_authentication_event ( sid ) . authn_time ) #NEWLINE# aresp [ 'session_state' ] = self . _compute_session_state ( state , salt , areq [ 'client_id' ] , redirect_uri ) #NEWLINE# headers . append ( self . write_session_cookie ( state ) ) #NEWLINE# #UNINDENT# if ( 'id_token' not in aresp ) : #NEWLINE# #INDENT# aresp [ 'iss' ] = self . baseurl #NEWLINE# aresp [ 'client_id' ] = areq [ 'client_id' ] #NEWLINE# #UNINDENT# logger . info ( 'authorization response: %s' , aresp . to_dict ( ) ) #NEWLINE# location = aresp . request ( redirect_uri , fragment_enc ) #NEWLINE# logger . debug ( "Redirected to: '%s' (%s)" , location , type ( location ) ) #NEWLINE# return SeeOther ( str ( location ) , headers = headers )