Merge pull request #954 from jakedt/badcreds

Return a 401 when doing a login with bad credentials
This commit is contained in:
Jake Moshenko 2015-11-20 18:38:42 -05:00
commit 4c3e41984d

View file

@ -103,6 +103,10 @@ def generate_registry_jwt():
'actions': actions,
})
elif user is None and token is None:
# In this case, we are doing an auth flow, and it's not an anonymous pull
return abort(401)
token_data = {
'iss': app.config['JWT_AUTH_TOKEN_ISSUER'],
'aud': audience_param,