Changeset 8257 for trunk/ndg_oauth


Ignore:
Timestamp:
06/11/12 16:41:06 (8 years ago)
Author:
pjkersha
Message:
  • fix to AuthorizationServer?.check_token to set token to None in error case where the Authorization header is missing or is incorrectly formatted.
  • fixed logging config in example ini files
Location:
trunk/ndg_oauth
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ndg_oauth/ndg_oauth_client/ndg/oauth/client/examples/bearer_tok/bearer_tok_client_app.ini

    r8251 r8257  
    7878# Logging configuration 
    7979[loggers] 
    80 keys = root, routes, test1, ndgoauthclient 
     80keys = root, ndg 
    8181 
    8282[handlers] 
     
    9090handlers = console 
    9191 
    92 [logger_routes] 
    93 level = INFO 
    94 handlers = 
    95 qualname = routes.middleware 
    96 # "level = DEBUG" logs the route matched and routing variables. 
    97  
    98 [logger_test1] 
     92[logger_ndg] 
    9993level = DEBUG 
    10094handlers = 
    101 qualname = test1 
    102  
    103 [logger_ndgoauthclient] 
    104 level = DEBUG 
    105 handlers = 
    106 qualname = ndg.oauth.client 
     95qualname = ndg 
    10796 
    10897[handler_console] 
     
    113102 
    114103[formatter_generic] 
    115 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s 
    116 datefmt = %H:%M:%S 
     104format = %(asctime)s.%(msecs)03d %(levelname)-7.7s [%(name)s:%(lineno)s] [%(threadName)s] %(message)s 
     105datefmt = %Y-%m-%d-%H:%M:%S 
     106 
  • trunk/ndg_oauth/ndg_oauth_client/ndg/oauth/client/examples/slcs/slcs_client_app.ini

    r8253 r8257  
    7575# Logging configuration 
    7676[loggers] 
    77 keys = root, routes, test1, ndgoauthclient 
     77keys = root, ndg 
    7878 
    7979[handlers] 
     
    8787handlers = console 
    8888 
    89 [logger_routes] 
    90 level = INFO 
    91 handlers = 
    92 qualname = routes.middleware 
    93 # "level = DEBUG" logs the route matched and routing variables. 
    94  
    95 [logger_test1] 
     89[logger_ndg] 
    9690level = DEBUG 
    9791handlers = 
    98 qualname = test1 
    99  
    100 [logger_ndgoauthclient] 
    101 level = DEBUG 
    102 handlers = 
    103 qualname = ndg.oauth.client 
     92qualname = ndg 
    10493 
    10594[handler_console] 
     
    11099 
    111100[formatter_generic] 
    112 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s 
    113 datefmt = %H:%M:%S 
     101format = %(asctime)s.%(msecs)03d %(levelname)-7.7s [%(name)s:%(lineno)s] [%(threadName)s] %(message)s 
     102datefmt = %Y-%m-%d-%H:%M:%S 
  • trunk/ndg_oauth/ndg_oauth_server/ndg/oauth/server/examples/bearer_tok/bearer_tok_server_app.ini

    r8251 r8257  
    177177# Logging configuration 
    178178[loggers] 
    179 keys = root, routes, ndgoauthserver 
     179keys = root, ndg 
    180180 
    181181[handlers] 
     
    189189handlers = console 
    190190 
    191 [logger_routes] 
    192 level = INFO 
    193 handlers = 
    194 qualname = routes.middleware 
    195 # "level = DEBUG" logs the route matched and routing variables. 
    196  
    197 [logger_ndgoauthserver] 
     191[logger_ndg] 
    198192level = DEBUG 
    199193handlers = 
    200 qualname = ndg.oauth.server 
     194qualname = ndg 
    201195 
    202196[handler_console] 
     
    207201 
    208202[formatter_generic] 
    209 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s 
    210 datefmt = %H:%M:%S 
     203format = %(asctime)s.%(msecs)03d %(levelname)-7.7s [%(name)s:%(lineno)s] [%(threadName)s] %(message)s 
     204datefmt = %Y-%m-%d-%H:%M:%S 
  • trunk/ndg_oauth/ndg_oauth_server/ndg/oauth/server/examples/slcs/slcs_server_app.ini

    r8236 r8257  
    228228# Logging configuration 
    229229[loggers] 
    230 keys = root, routes, ndgoauthserver 
     230keys = root, ndg 
    231231 
    232232[handlers] 
     
    240240handlers = console 
    241241 
    242 [logger_routes] 
    243 level = INFO 
    244 handlers = 
    245 qualname = routes.middleware 
    246 # "level = DEBUG" logs the route matched and routing variables. 
    247  
    248 [logger_ndgoauthserver] 
     242[logger_ndg] 
    249243level = DEBUG 
    250244handlers = 
    251 qualname = ndg.oauth.server 
     245qualname = ndg 
    252246 
    253247[handler_console] 
     
    258252 
    259253[formatter_generic] 
    260 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s 
    261 datefmt = %H:%M:%S 
     254format = %(asctime)s.%(msecs)03d %(levelname)-7.7s [%(name)s:%(lineno)s] [%(threadName)s] %(message)s 
     255datefmt = %Y-%m-%d-%H:%M:%S 
  • trunk/ndg_oauth/ndg_oauth_server/ndg/oauth/server/lib/authorization_server.py

    r8252 r8257  
    518518            log.error('No Authorization header present for request to %r', 
    519519                      request.path_url) 
    520             error = 'invalid_request'             
     520            error = 'invalid_request' 
     521            token = None             
    521522        else: 
    522523            authorization_hdr_parts = authorization_hdr.split() 
Note: See TracChangeset for help on using the changeset viewer.