-
-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Labels
acceptedIssue has been accepted and inserted in a future milestoneIssue has been accepted and inserted in a future milestone
Milestone
Description
delphimvcframework/samples/CustomAuth/AuthHandlerU.pas
Lines 56 to 69 in 73573c0
procedure TCustomAuth.OnAuthentication(const AContext: TWebContext; const UserName: string; const Password: string; | |
UserRoles: TList<System.string>; | |
var IsValid: Boolean; | |
const SessionData: System.Generics.Collections.TDictionary<System.string, System.string>); | |
begin | |
{ | |
Here you should do the actual query on database or other "users store" to | |
check if the user identified by UserName and Password is a valid user. | |
You have to fill also the UserRoles list with the roles of the user. | |
Moreover additional user properties can be added in the SessionData dictionary | |
} | |
// We defined 3 statc users here: admin, user1, user2 | |
IsValid := False; |
I added raise EDivByZero.Create('Division by zero.');
this line to the method above and run the sample app. Could not get any response when post http://localhost:8080/system/users/logged by Postman. The exception is logged but no respone is sent. Is it posible to send HTTP 500 response when an exception raised in the auth handler? Thanks.
Metadata
Metadata
Assignees
Labels
acceptedIssue has been accepted and inserted in a future milestoneIssue has been accepted and inserted in a future milestone