Add form authentication info to docs
Validate the value of the auth-type parameter and remove the 'unexpected value' fallback. Change-Id: Idbc70251e27ea760c03df585df3ca6b469c4e163
This commit is contained in:
parent
ccc5baaf9e
commit
e5f37b6796
@ -73,9 +73,8 @@ line.
|
||||
in the Gerrit web interface.
|
||||
|
||||
**auth-type**
|
||||
Authentication type required by the Gerrit server. Can be 'basic'
|
||||
or 'digest'. Defaults to 'digest' if not set or set to an
|
||||
unexpected value.
|
||||
Authentication type required by the Gerrit server. Can be 'basic',
|
||||
'digest', or 'form'. Defaults to 'digest'.
|
||||
|
||||
**git-root (required)**
|
||||
A location where Gertty should store its git repositories. These
|
||||
|
@ -23,8 +23,8 @@ servers:
|
||||
# username: CHANGEME
|
||||
# Your password in Gerrit (Settings -> HTTP Password). [required]
|
||||
# password: CHANGEME
|
||||
# Authentication type required by the Gerrit server. Can be 'basic', 'digest' or
|
||||
# 'form'. Defaults to 'digest' if not set or set to an unexpected value.
|
||||
# Authentication type required by the Gerrit server. Can be 'basic',
|
||||
# 'digest', or 'form'. Defaults to 'digest'.
|
||||
# auth-type: digest
|
||||
# A location where Gertty should store its git repositories. These
|
||||
# can be the same git repositories where you do your own work --
|
||||
|
@ -49,7 +49,7 @@ class ConfigSchema(object):
|
||||
'git-url': str,
|
||||
'log-file': str,
|
||||
'socket': str,
|
||||
'auth-type': str,
|
||||
'auth-type': v.Any('basic', 'digest', 'form'),
|
||||
}
|
||||
|
||||
servers = [server]
|
||||
@ -165,9 +165,6 @@ class Config(object):
|
||||
"Permissions are: {}".format(self.path, oct(mode)))
|
||||
exit(1)
|
||||
self.auth_type = server.get('auth-type', 'digest')
|
||||
auth_types = ['digest', 'basic', 'form']
|
||||
if self.auth_type not in auth_types:
|
||||
self.auth_type = 'digest'
|
||||
self.verify_ssl = server.get('verify-ssl', True)
|
||||
if not self.verify_ssl:
|
||||
os.environ['GIT_SSL_NO_VERIFY']='true'
|
||||
|
Loading…
x
Reference in New Issue
Block a user