#NEWLINE# def match_client_request( self , request ) : #NEWLINE# #INDENT# for ( _pref , _prov ) in PREFERENCE2PROVIDER . items ( ) : #NEWLINE# #INDENT# if ( _pref in request ) : #NEWLINE# #INDENT# if ( _pref == 'response_types' ) : #NEWLINE# #INDENT# if ( not self . match_sp_sep ( request [ _pref ] , self . capabilities [ _prov ] ) ) : #NEWLINE# #INDENT# raise CapabilitiesMisMatch ( _pref ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( request [ _pref ] , six . string_types ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# assert ( request [ _pref ] in self . capabilities [ _prov ] ) #NEWLINE# #UNINDENT# except AssertionError : #NEWLINE# #INDENT# raise CapabilitiesMisMatch ( _pref ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( not set ( request [ _pref ] ) . issubset ( set ( self . capabilities [ _prov ] ) ) ) : #NEWLINE# #INDENT# raise CapabilitiesMisMatch ( _pref )