|
|
|
@ -23,6 +23,7 @@ import os #for path operations
|
|
|
|
|
from http import cookies
|
|
|
|
|
global gSettingsDict
|
|
|
|
|
from . import ServerSettings
|
|
|
|
|
from . import __Orchestrator__
|
|
|
|
|
import copy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -80,19 +81,11 @@ def AuthenticateVerify(inRequest):
|
|
|
|
|
if "\\" in lUser:
|
|
|
|
|
lDomain = lUser.split("\\")[0]
|
|
|
|
|
lUser = lUser.split("\\")[1]
|
|
|
|
|
#Try to logon - use processor
|
|
|
|
|
lLogonResult = ProcessorOld.Activity(
|
|
|
|
|
{
|
|
|
|
|
"Type": "WindowsLogon",
|
|
|
|
|
"Domain": lDomain,
|
|
|
|
|
"User": lUser,
|
|
|
|
|
"Password": lPassword
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
lLogonBool = __Orchestrator__.OSCredentialsVerify(inUserStr=lUser, inPasswordStr=lPassword, inDomainStr=lDomain)
|
|
|
|
|
#Check result
|
|
|
|
|
if lLogonResult["Result"]:
|
|
|
|
|
lResult["Domain"] = lLogonResult["Domain"]
|
|
|
|
|
lResult["User"] = lLogonResult["User"]
|
|
|
|
|
if lLogonBool:
|
|
|
|
|
lResult["Domain"] = lDomain
|
|
|
|
|
lResult["User"] = lUser
|
|
|
|
|
#Create token
|
|
|
|
|
lAuthToken=str(uuid.uuid1())
|
|
|
|
|
gSettingsDict["ServerDict"]["AccessUsers"]["AuthTokensDict"][lAuthToken] = {}
|
|
|
|
|