salt icon indicating copy to clipboard operation
salt copied to clipboard

Differentiate between permissions and authentication failure

Open SmithSamuelM opened this issue 13 years ago • 3 comments

If the user has successfully authenticated and the token is still valid, raise an authorization exception not an authentication exception. The authorization exception is a subclass of the authentication exception so no salt code has to change but the salt-api can detect the difference.

SmithSamuelM avatar Jul 29 '13 23:07 SmithSamuelM

After a (very) little investigation I'm fuzzy on how to tackle this one since we're not raising exceptions at this point in the code.

whiteinge avatar Dec 03 '13 05:12 whiteinge

Any specific reason why an exception should not be raised as opposed to returning ''?

s0undt3ch avatar Dec 03 '13 10:12 s0undt3ch

ZD-1488

rickh563 avatar May 30 '17 21:05 rickh563