Reverse check order between WebCert and WebPrincipal in case both are set

In the case that both WebPrincipal and WebCert are set, reverse the
order of checking them so that WebCert is used by default.
This commit is contained in:
Tim Smith 2021-04-15 22:54:30 +01:00 committed by Yu Ming Zhu
parent 6e58377a89
commit 330e4d5a1f

View file

@ -277,10 +277,10 @@ def login(environ, page=None):
# This matches the original behaviour
webauth = options['WebAuth']
if not webauth:
if options['WebCert']:
webauth = 'ssl'
if options['WebPrincipal']:
webauth = 'kerberos'
if options['WebCert']:
webauth = 'ssl'
if not webauth:
raise koji.AuthError(