mirror of
https://github.com/capricornxl/ad-password-self-service.git
synced 2025-08-12 01:44:58 +08:00
添加自动安装脚本,方便快速部署上线。
调整部分代码,之前scheme是写死的https,考虑可能会有使用http,所以改成从request.scheme中取。 添加uwsgi启动脚本
This commit is contained in:
BIN
pwdselfservice/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
pwdselfservice/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
BIN
pwdselfservice/__pycache__/loca_settings.cpython-36.pyc
Normal file
BIN
pwdselfservice/__pycache__/loca_settings.cpython-36.pyc
Normal file
Binary file not shown.
BIN
pwdselfservice/__pycache__/local_settings.cpython-36.pyc
Normal file
BIN
pwdselfservice/__pycache__/local_settings.cpython-36.pyc
Normal file
Binary file not shown.
BIN
pwdselfservice/__pycache__/settings.cpython-36.pyc
Normal file
BIN
pwdselfservice/__pycache__/settings.cpython-36.pyc
Normal file
Binary file not shown.
BIN
pwdselfservice/__pycache__/urls.cpython-36.pyc
Normal file
BIN
pwdselfservice/__pycache__/urls.cpython-36.pyc
Normal file
Binary file not shown.
BIN
pwdselfservice/__pycache__/wsgi.cpython-36.pyc
Normal file
BIN
pwdselfservice/__pycache__/wsgi.cpython-36.pyc
Normal file
Binary file not shown.
@@ -1,30 +1,39 @@
|
||||
# AD配置
|
||||
AD_HOST = 'abc.com'
|
||||
AD_LOGIN_USER = 'abc\pwdadmin'
|
||||
AD_LOGIN_USER_PWD = 'gVykWgNNF0oBQzwmwPp8'
|
||||
BASE_DN = 'OU=RD,DC=abc,DC=com'
|
||||
# AD配置,修改为自己的
|
||||
# AD主机,可以是IP或主机域名,例如可以是:abc.com或172.16.122.1
|
||||
AD_HOST = '修改为自己的'
|
||||
|
||||
# 用于登录AD做用户信息验证的账号, 需要有修改用户账号密码的权限。
|
||||
# 账号格式使用DOMAIN\USERNAME,例如:abc\pwdadmin
|
||||
AD_LOGIN_USER = '修改为自己的'
|
||||
|
||||
# 密码
|
||||
AD_LOGIN_USER_PWD = '修改为自己的'
|
||||
|
||||
# BASE DN,账号的查找DN路径,例如:'DC=abc,DC=com',可以指定到OU之下,例如:'OU=RD,DC=abc,DC=com'。
|
||||
BASE_DN = '修改为自己的'
|
||||
|
||||
# 钉钉配置
|
||||
# 钉钉统一接口地址,不可修改。
|
||||
# 钉钉接口地址,不可修改
|
||||
DING_URL = "https://oapi.dingtalk.com/sns"
|
||||
|
||||
# 钉钉企业ID
|
||||
DING_CORP_ID = 'ding0176902811df32'
|
||||
# 钉钉企业ID,修改为自己的
|
||||
DING_CORP_ID = '修改为自己的'
|
||||
|
||||
# 钉钉E应用
|
||||
DING_AGENT_ID = '25311eeee'
|
||||
DING_APP_KEY = 'dingqdzmax324v'
|
||||
DING_APP_SECRET = 'rnGRJhhw5kVmzykG9mrTDxewmI4e0myPAluMlguYQOaadsf2fhgfdfsx'
|
||||
# 钉钉E应用,修改为自己的
|
||||
DING_AGENT_ID = '修改为自己的'
|
||||
DING_APP_KEY = '修改为自己的'
|
||||
DING_APP_SECRET = '修改为自己的'
|
||||
|
||||
# 钉钉移动应用接入
|
||||
DING_SELF_APP_ID = 'dingoabrzugusdfdf33fgfds'
|
||||
DING_SELF_APP_SECRET = 'IrH2MedSgesguFjGvFCTjXYBRZDhA5AI4ADQU5710sgLffdsadf32uhgfdsfs'
|
||||
# 钉钉移动应用接入,修改为自己的
|
||||
DING_SELF_APP_ID = '修改为自己的'
|
||||
DING_SELF_APP_SECRET = '修改为自己的'
|
||||
|
||||
# Crypty key 通过generate_key生成,可不用修改,如果需要自行生成,请使用Crypto.generate_key自行生成,用于加密页面提交的明文密码
|
||||
# Crypty key 通过generate_key生成,可不用修改
|
||||
CRYPTO_KEY = b'dp8U9y7NAhCD3MoNwPzPBhBtTZ1uI_WWSdpNs6wUDgs='
|
||||
|
||||
# COOKIE 超时,定义多长时间页面失效,单位秒。
|
||||
# COOKIE 超时单位是秒,可不用修改
|
||||
TMPID_COOKIE_AGE = 300
|
||||
|
||||
|
||||
# 主页域名,index.html中的钉钉跳转等需要指定域名。
|
||||
HOME_URL = 'https://pwd.abc.com'
|
||||
HOME_URL = 'PWD_SELF_SERVICE_DOMAIN'
|
@@ -88,7 +88,7 @@ SESSION_EXPIRE_AT_BROWSER_CLOSE = True
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
# 'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
@@ -132,12 +132,12 @@ WSGI_APPLICATION = 'pwdselfservice.wsgi.application'
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
# DATABASES = {
|
||||
# 'default': {
|
||||
# 'ENGINE': 'django.db.backends.sqlite3',
|
||||
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
# }
|
||||
# }
|
||||
|
||||
|
||||
# Password validation
|
||||
|
@@ -1,11 +1,8 @@
|
||||
from django.urls import path, include, re_path
|
||||
from django.urls import path
|
||||
from django.views.generic.base import RedirectView
|
||||
from django.conf import urls
|
||||
import resetpwd.views
|
||||
from django.conf.urls.static import static
|
||||
|
||||
urlpatterns = {
|
||||
# path('admin/', admin.site.urls)
|
||||
path("favicon.ico", RedirectView.as_view(url='static/img/favicon.ico')),
|
||||
path('', resetpwd.views.resetpwd_index, name='index'),
|
||||
path('resetcheck', resetpwd.views.resetpwd_check_userinfo, name='resetcheck'),
|
||||
|
Reference in New Issue
Block a user