I am creating a test application to demonstrate the authentication in the TMS XData implementation.
I have followed the examples in documentation and have the following questions:
I have implemented a "LoginService" and "ServerStats".
Login does not contain [Authorize]
I have included the required attribute in the "ServerStats" as follow:
IServerStatsService = interface(IInvokable)
function EchoString(Value: string): string;
When starting my modules, I have implemented logic as follow:
fXDataModule.SwaggerOptions.AuthMode := TSwaggerAuthMode.Jwt;
- I am able to execute "EchoString" even though I am not authenticated.
- Having a look at the TJwtMiddleware.ProcessRequest checks for ForbidAnonymousAccess, but when I enable this, I cant even open Swagger or execute my Login.
Am I missing something else in the implementation?