Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
emWebAppTemplate
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mac Stephens
emWebAppTemplate
Commits
fceb378c
Commit
fceb378c
authored
Mar 30, 2026
by
Mac Stephens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to login xdata connection error
parent
6ee6efe1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
22 deletions
+31
-22
ConnectionModule.pas
templateWebApp/ConnectionModule.pas
+3
-3
View.Login.pas
templateWebApp/View.Login.pas
+15
-9
templateXDataServer.ini
templateXDataServer/bin/templateXDataServer.ini
+1
-1
Auth.ServiceImpl.pas
templateXDataServer/source/Auth.ServiceImpl.pas
+1
-4
Common.Ini.pas
templateXDataServer/source/Common.Ini.pas
+0
-5
templateXDataServer.dproj
templateXDataServer/templateXDataServer.dproj
+11
-0
No files found.
templateWebApp/ConnectionModule.pas
View file @
fceb378c
...
...
@@ -4,7 +4,7 @@ interface
uses
System
.
SysUtils
,
System
.
Classes
,
WEBLib
.
Modules
,
XData
.
Web
.
Connection
,
App
.
Types
,
App
.
Config
,
XData
.
Web
.
Client
,
WEBLib
.
Dialogs
;
App
.
Types
,
App
.
Config
,
XData
.
Web
.
Client
,
WEBLib
.
Dialogs
,
Utils
;
type
TDMConnection
=
class
(
TWebDataModule
)
...
...
@@ -73,8 +73,8 @@ var
errorMsg
:
string
;
begin
errorMsg
:=
Error
.
ErrorMessage
;
if
errorMsg
=
''
then
errorMsg
:=
'
Connection error
'
;
if
errorMsg
=
'
Error connecting to XData server
'
then
errorMsg
:=
'
Error connecting to server. Please try again later.
'
;
if
Assigned
(
FUnauthorizedAccessProc
)
then
FUnauthorizedAccessProc
(
errorMsg
)
...
...
templateWebApp/View.Login.pas
View file @
fceb378c
...
...
@@ -6,8 +6,7 @@ uses
System
.
SysUtils
,
System
.
Classes
,
Web
,
WEBLib
.
Graphics
,
WEBLib
.
Controls
,
WEBLib
.
Forms
,
WEBLib
.
Dialogs
,
Vcl
.
Controls
,
Vcl
.
StdCtrls
,
WEBLib
.
StdCtrls
,
WEBLib
.
JSON
,
XData
.
Web
.
Client
,
WEBLib
.
ExtCtrls
,
Vcl
.
Imaging
.
pngimage
,
JS
,
XData
.
Web
.
Connection
,
App
.
Types
,
ConnectionModule
;
JS
,
XData
.
Web
.
Connection
,
App
.
Types
,
ConnectionModule
;
type
TFViewLogin
=
class
(
TWebForm
)
...
...
@@ -55,14 +54,21 @@ procedure TFViewLogin.btnLoginClick(Sender: TObject);
begin
ShowNotification
(
'Login Error: '
+
AMsg
);
end
;
var
hashPW
:
string
;
procedure
AuthConnectionOpened
;
begin
AuthService
.
Login
(
edtUsername
.
Text
,
edtPassword
.
Text
,
DMConnection
.
clientVersion
,
@
LoginSuccess
,
@
LoginError
);
end
;
begin
AuthService
.
Login
(
edtUsername
.
Text
,
edtPassword
.
Text
,
DMConnection
.
clientVersion
,
@
LoginSuccess
,
@
LoginError
);
if
not
DMConnection
.
AuthConnection
.
Connected
then
DMConnection
.
AuthConnection
.
Open
(@
AuthConnectionOpened
)
else
AuthConnectionOpened
;
end
;
class
procedure
TFViewLogin
.
Display
(
LoginProc
:
TSuccessProc
);
...
...
templateXDataServer/bin/templateXDataServer.ini
View file @
fceb378c
[Settings]
MemoLogLevel
=
5
FileLogLevel
=
5
LogFileNum
=
4
0
LogFileNum
=
4
4
DevMode
=
0
webClientVersion
=
0.0.1
...
...
templateXDataServer/source/Auth.ServiceImpl.pas
View file @
fceb378c
...
...
@@ -130,15 +130,12 @@ begin
raise
EXDataHttpUnauthorized
.
Create
(
'Invalid username or password'
);
end
;
// ADD THIS DELETE BEFORE DEPLOY
passwordHash
:=
password
.
ToUpper
;
storedHash
:=
AuthDb
.
uqUser
.
FieldByName
(
'user_password'
).
AsString
.
ToUpper
;
// STOP HERE DELETE BEFORE DEPLOY
// REMOVE THIS DELETE BEFORE DEPLOY
// passwordHash := THashSHA2.GetHashString(username + password, THashSHA2.TSHA2Version.SHA256).ToUpper;
// storedHash := AuthDb.uqUser.FieldByName('user_password').AsString.ToUpper;
// STOP HERE DELETE BEFORE DEPLOY
if
storedHash
<>
passwordHash
then
begin
...
...
templateXDataServer/source/Common.Ini.pas
View file @
fceb378c
...
...
@@ -8,13 +8,11 @@ uses
type
TIniEntries
=
class
private
// [Settings]
FConsoleLogLevel
:
Integer
;
FFileLogLevel
:
Integer
;
FLogFileNum
:
Integer
;
FJWTSecret
:
string
;
// [Database]
FDBServer
:
string
;
FDBPort
:
Integer
;
FDBDatabase
:
string
;
...
...
@@ -24,7 +22,6 @@ type
public
constructor
Create
;
// Properties
property
consoleLogLevel
:
Integer
read
FConsoleLogLevel
;
property
fileLogLevel
:
Integer
read
FFileLogLevel
;
property
logFileNum
:
Integer
read
FLogFileNum
;
...
...
@@ -59,12 +56,10 @@ var
begin
iniFile
:=
TIniFile
.
Create
(
ChangeFileExt
(
Application
.
ExeName
,
'.ini'
));
try
// [Settings]
FConsoleLogLevel
:=
iniFile
.
ReadInteger
(
'Settings'
,
'ConsoleLogLevel'
,
3
);
FFileLogLevel
:=
iniFile
.
ReadInteger
(
'Settings'
,
'FileLogLevel'
,
3
);
FLogFileNum
:=
iniFile
.
ReadInteger
(
'Settings'
,
'LogFileNum'
,
0
);
// [Database]
FDBServer
:=
iniFile
.
ReadString
(
'Database'
,
'Server'
,
'192.168.116.129'
);
FDBPort
:=
iniFile
.
ReadInteger
(
'Database'
,
'Port'
,
0
);
FDBDatabase
:=
iniFile
.
ReadString
(
'Database'
,
'Database'
,
'kg_order_entry'
);
...
...
templateXDataServer/templateXDataServer.dproj
View file @
fceb378c
...
...
@@ -831,6 +831,9 @@
<Platform Name="Win64x">
<Operation>1</Operation>
</Platform>
<Platform Name="WinARM64EC">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
...
...
@@ -901,6 +904,10 @@
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="WinARM64EC">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
...
...
@@ -911,6 +918,10 @@
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="WinARM64EC">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iOS_AppStore1024">
<Platform Name="iOSDevice64">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment