#NEWLINE# def __init__( self , keys = None , source = '' , cache_time = 300 , verify_ssl = True , fileformat = 'jwk' , keytype = 'RSA' , keyusage = None ) : #NEWLINE# #INDENT# '\n\n        :param keys: A list of dictionaries\n            with the keys ["kty", "key", "alg", "use", "kid"]\n        :param source: Where the key set can be fetch from\n        :param verify_ssl: Verify the SSL cert used by the server\n        :param fileformat: For a local file either "jwk" or "der"\n        :param keytype: Iff local file and \'der\' format what kind of key it is.\n        ' #NEWLINE# self . _keys = [ ] #NEWLINE# self . remote = False #NEWLINE# self . verify_ssl = verify_ssl #NEWLINE# self . cache_time = cache_time #NEWLINE# self . time_out = 0 #NEWLINE# self . etag = '' #NEWLINE# self . source = None #NEWLINE# self . fileformat = fileformat . lower ( ) #NEWLINE# self . keytype = keytype #NEWLINE# self . keyusage = keyusage #NEWLINE# self . imp_jwks = None #NEWLINE# self . last_updated = 0 #NEWLINE# if keys : #NEWLINE# #INDENT# self . source = None #NEWLINE# if isinstance ( keys , dict ) : #NEWLINE# #INDENT# self . do_keys ( [ keys ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . do_keys ( keys ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if source . startswith ( 'file://' ) : #NEWLINE# #INDENT# self . source = source [ 7 : ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( source . startswith ( 'http://' ) or source . startswith ( 'https://' ) ) : #NEWLINE# #INDENT# self . source = source #NEWLINE# self . remote = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( source == '' ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise KeyIOError ( ( 'Unsupported source type: %s' % source ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( not self . remote ) : #NEWLINE# #INDENT# if ( self . fileformat == 'jwk' ) : #NEWLINE# #INDENT# self . do_local_jwk ( self . source ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . fileformat == 'der' ) : #NEWLINE# #INDENT# self . do_local_der ( self . source , self . keytype , self . keyusage )