0030f0 If the user provided a token, validate it even on optional endpoints

Authored and Committed by Pierre-Yves Chibon 10 years ago
    If the user provided a token, validate it even on optional endpoints
    
    optional token endpoints are endpoints where providing a token is not
    mandatory.
    For examples to list tickets, if you are anonymous (no token), it will
    return all the public tickets while if you are logged in, it will also
    return the private tickets you have access to.
    
    But for the API's consistency, as soon as the user provides a token we
    should check if it is still valid and signal if it is not
    
        
file modified
+5 -1