You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Tools/RobotDB/AccessUser_SuperToken.py

35 lines
1.5 KiB

import datetime
def SettingsUpdate(inDict):
##################################################
#""/"SuperToken" MethodMatchURLList
l__SuperToken_RuleMethodMatchURLBeforeList={
("","SUPERTOKEN"): { #!!!!!only in upper case!!!!
"MethodMatchURLBeforeList": [
{
"Method":"GET",
"MatchType":"Beginwith",
"URL":"/",
#"FlagAccessDefRequestGlobalAuthenticate": TestDef
"FlagAccess": True
},
{
"Method":"POST",
"MatchType":"Beginwith",
"URL":"/",
#"FlagAccessDefRequestGlobalAuthenticate": TestDef
"FlagAccess": True
}
]
}
}
#Append to global list
inDict["Server"]["AccessUsers"]["RuleDomainUserDict"].update(l__SuperToken_RuleMethodMatchURLBeforeList)
#"<AuthToken>":{"User":"", "Domain":"", "TokenDatetime":<Datetime>}
#!!!!!!!!!!!!!!!!!!!!!!!
#Attention: default supertoken is 1992-04-03-0643-ru-b4ff-openrpa52zzz - please change it when you will customize OpenRPA in your company
#!!!!!!!!!!!!!!!!!!!!!!!
inDict["Server"]["AccessUsers"]["AuthTokensDict"].update(
{"1992-04-03-0643-ru-b4ff-openrpa52zzz":{"User":"SuperToken", "Domain":"", "TokenDatetime": datetime.datetime.now(), "FlagDoNotExpire":True}}
)
#Return current dict
return inDict