Change app registry to use the credentials verification system
Allows for tokens, OAuth tokens and robot accounts to be used as well Fixes https://jira.prod.coreos.systems/browse/QS-36
This commit is contained in:
parent
aa49b37ad2
commit
3bf8973fd9
3 changed files with 13 additions and 7 deletions
|
@ -96,9 +96,13 @@ def create_user():
|
|||
if kind == CredentialKind.oauth_token:
|
||||
abort(400, 'Invalid oauth access token.', issue='invalid-oauth-access-token')
|
||||
|
||||
# Mark that the login failed.
|
||||
event = userevents.get_event(username)
|
||||
event.publish_event_data('docker-cli', {'action': 'loginfailure'})
|
||||
if kind == CredentialKind.user:
|
||||
# Mark that the login failed.
|
||||
event = userevents.get_event(username)
|
||||
event.publish_event_data('docker-cli', {'action': 'loginfailure'})
|
||||
abort(400, result.error_message, issue='login-failure')
|
||||
|
||||
# Default case: Just fail.
|
||||
abort(400, result.error_message, issue='login-failure')
|
||||
|
||||
if result.has_user:
|
||||
|
|
Reference in a new issue