mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 21:21:21 -03:30
add basic auth enabled / disabled setting
This commit is contained in:
parent
5942819d86
commit
96e282dbaf
@ -242,6 +242,10 @@ AUTH_TOKEN_EXPIRATION = 1800
|
||||
# -1 is unlimited
|
||||
AUTH_TOKEN_PER_USER = -1
|
||||
|
||||
# Enable / Disable HTTP Basic Authentication used in the API browser
|
||||
# Note: Session limits are not enforced when using HTTP Basic Authentication.
|
||||
AUTH_BASIC_ENABLED = True
|
||||
|
||||
# If set, serve only minified JS for UI.
|
||||
USE_MINIFIED_JS = False
|
||||
|
||||
|
||||
@ -29,3 +29,7 @@ if not all([SOCIAL_AUTH_SAML_SP_ENTITY_ID, SOCIAL_AUTH_SAML_SP_PUBLIC_CERT,
|
||||
SOCIAL_AUTH_SAML_TECHNICAL_CONTACT, SOCIAL_AUTH_SAML_SUPPORT_CONTACT,
|
||||
SOCIAL_AUTH_SAML_ENABLED_IDPS]):
|
||||
AUTHENTICATION_BACKENDS = [x for x in AUTHENTICATION_BACKENDS if x != 'social.backends.saml.SAMLAuth']
|
||||
|
||||
if not AUTH_BASIC_ENABLED:
|
||||
REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = [x for x in REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] if x != 'rest_framework.authentication.BasicAuthentication']
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user