TSimpleLoginService Class

This is a Library topic for Data Abstract for Delphi
This page is generated from external data, please do not update
Interfaces — Classes — Enums — Aliases — Implements
Contents |
Overview
Implements the base service for user authentication with the ISimpleLoginService service interface.
A service of this type will be automatically created for you if you select the Simple Login template when starting a new project.
Location
SimpleLoginService_Impl.pas
- Ancestry: TDataModule | TRORemoteDataModule | TDataAbstractService | TBaseLoginService | TSimpleLoginService
Implemented interfaces
Properties
| AcquireConnection (declared in TDataAbstractService) |
|---|
|
Toggles whether the service can automatically acquire a connection when needed (true, default) or not (false).
|
| AllowAllFieldsInDynamicWhere (declared in TDataAbstractService) |
|
By security reasons, only fields that are present in table definition can be used in Dynamic Where expression. This property allows to override default behavior and use any fields in such expressions. (Default value is False).
|
| AllowDataAccess (declared in TDataAbstractService) |
|
Allows the clients to access schema information from the published schema (true, default) or not (false). Set this property to false if you want to prevent clients from accessing the data published by the ServiceSchema. This might be done on a per-client basis, depending on user rights, by setting the property on the OnActivate event.
|
| AllowDynamicSelect (declared in TDataAbstractService) |
|
Allows clients to use Dynamic Select feature.
|
| AllowDynamicWhere (declared in TDataAbstractService) |
|
Allows clients to use Dynamic Where feature.
|
| AllowExecuteCommands (declared in TDataAbstractService) |
|
Allows clients to execute commands that are published in the schema (true) or not (false, default). Set this property to true if you want to enable clients to manually execute commands defined in the ServiceSchema.
|
| AllowExecuteSQL (declared in TDataAbstractService) |
|
Allows clients to execute custom SQL, as command or for retrieving data published in the schema (true) or not (false, default). Since enabling this option opens a huge security risk, AllowExecuteSQL is set to false by default. If enabled, client applications can send custom SQL text to the server for execution, including code that could potentially harm or destroy the database. Even when using proper user authentication and trusting the client applications, this is a high security risk, as client applications could be modified to send malicious code, or a new client could be written by attackers.
|
| AllowSchemaAccess (declared in TDataAbstractService) |
|
Allows clients to access data from the published schema (true, default) or not (false). While access to schema information from the server is often helpful while designing the client application, most clients do not need to refresh schema information from the server at runtime. Although proper use of user authentication will restrict access, disabling this option for production servers prevents unnecessary exposure of the server's schema.
|
| AllowUpdates (declared in TDataAbstractService) |
|
Allows clients to update data.
|
| AllowWhereSQL (declared in TDataAbstractService) |
|
Allows clients to transmit custom WHERE clauses as part of fetching data (true) or not (false, default). Since WHERE clauses are plain text base SQL, enabling this option opens a huge security risk, as malicious clients could use SQL injections to perform unexpected database operations as part of the submitted WHERE clause. Even when using proper user authentication and trusting the client applications, this is a high security risk, as client applications could be modified to send malicious code, or a new client could be written by attackers. Please also refer to the Where Clauses help topic for more details.
|
| AutoCreateBusinessProcessors (declared in TDataAbstractService) |
|
Specifies if the service will automatically instantiate TDABusinessProcessors to process deltas, if needed. If set to true (default), the service will use the TDABusinessProcessors dropped on the service to perform updates, if present, but will automatically create new Business Processors if none are configured for a particular data table. If set to false, the server will only process deltas for tables that explicitly have a business processor configured for them; if none is configured, the delta will be rejected with an exception.
|
| ClientID (declared in TRORemoteDataModule) |
|
The unique identifier for the client connected to the service. It is equal to the session ID if the session already exists. When the service method is called, this property is already initialized with a proper value. Do not change it unless you know what you are doing!
|
| Connection (declared in TDataAbstractService) |
|
Returns a live connection to the back-end database based on the configured ConnectionName value. If a connection was previously requested, the same instance will be returned, if a fresh connection to the database couldn't be obtained from the connection manager. Once a connection is acquired, it will be held on until the service gets deactivated, or ReleaseConnection is called.
|
| ConnectionName (declared in TDataAbstractService) |
|
Defines the name of the connection that this service will use to connect to the back-end database. If set, all data access done by the service will use the specified connection; if not set, the default connection as defined in connection manager will be used. A typical use case for this property would be to set the connection name in the OnActivate or BeforeAcquireConnection event to match a specific connection, which, for example, could have been stored in the Sessions. The default code provided by the MultiDb Server template uses this approach. When setting ConnectionName and a connection is already acquired, make sure to call the ReleaseConnection method, so that a new connection will be obtained when needed.
|
| EventRepository (declared in TRORemoteDataModule) |
|
Points to the event repository (TROEventRepository instance) for the service. The value must be set to use the events feature.
|
| ExportedDataTables (declared in TDataAbstractService) |
|
Maintains a list of server-side TDADataTables that will be published by the server, alongside the data tables defined in the schema. This allows the service to publish data that does not necessarily come from the back-end database targeted by the schema and connection, but also from other sources. For example, the TDADataTables could be filled from a different database, loaded from a file on disk, or manually filled from code. For the client application, these tables will look like any other data table published by the server.
|
| LegacyEvents (declared in TRORemoteDataModule) |
|
Enables or disables the legacy events mode for the service. The default value is true. The legacy mode is less secure and it is recommended to set this property to false for new projects. Note that refusing to use the legacy mode will break compatibility with legacy Delphi clients.
|
| NewSession (declared in TRORemoteDataModule) |
|
Indicates that the client's session was just created, i.e. this indicates the first connection of a so far unknown client.
|
| ProcessDeltasWithoutUpdateRules (declared in TDataAbstractService) |
|
Manages whether the service will process deltas for which no update rules have been defined (true) or not (false). If set to true (default), the service will process all delta packets it receives. If set to false, it will only process those deltas for which an update rule has been defined. Please refer to the Update Rules help topic for more details on update rules.
|
| RefCount (declared in TRORemoteDataModule) |
|
Reference counter - this class is the interfaced object.
|
| RequiresSession (declared in TRORemoteDataModule) |
|
This property should be set to true (perhaps with the designer) to make the service protected and to disallow unauthenticated clients to call its methods. Read more.
|
| ReturnFullSchema (declared in TDataAbstractService) |
|
Allows to return full schema including content of statements. by default is False. We recommend to not change this value by security reasons.
|
| ReturnUpdateFailureDelta (declared in TDataAbstractService) |
|
Part of Reconcile Dialog feature. Allows to return of failed changes to client via setting RaiseExceptionAtError for all autogenerated TDABusinessProcessor. by default is True. Can be used for applying changes for several tables in one transaction with False value. See also TDABusinessProcessor.RaiseExceptionAtError
|
| ScriptProvider (declared in TDataAbstractService) |
|
Specifies Business Rules Scripting provider.
|
| ServiceDataStreamer (declared in TDataAbstractService) |
|
References the TDADataStreamer that will be used to stream data to and from the network. The data streamer determines the format that will be used to send data on the wire, so the type selected on the service must match the type selected for the TDARemoteDataAdapter.DataStreamer property on the client. Note that data streamers are not re-entrant, so every service instance must use its own data streamer instance. The best way to achieve this is to make sure the data streamer component is dropped into the service module itself, and not referenced from elsewhere. Also note that the data streamer assigned to the ServiceDataStreamer should be reserved for use by the service only. If you do any custom processing requiring a data streamer in your own code (such as filling server-side TDADataTables), make sure to use a second streamer instance for this, to avoid conflicts.
|
| ServiceSchema (declared in TDataAbstractService) |
|
This property points to the TDASchema component defining the schema that will be published by this service. This can be a schema component located on the service data module or (more typically) on a separate global data module in the server application. Data Abstract uses a 1:1 mapping of services and schemas, where every service publishes one schema. Depending on your application design and the scope of your server, you might only use one schema for the entire data access, or logically partition your data tables across different schemas (and services). Locating the schema on a global data module rather than the service module itself might provide a slight performance benefit, as the schema structure only has to be loaded into memory once (on application startup), not every time a new service instance is created. Also note that the TDAConnectionManager (referenced from the schema) must be located off the service module and in a global location for connection pooling to work properly across service instances.
|
| Session (declared in TRORemoteDataModule) |
|
Provides access to the session object of the current connection. If the session does not exist, it is created at the moment of property access.
|
| SessionManager (declared in TRORemoteDataModule) |
|
Points to the session manager to use. It is necessary to assign the session manager if the protected service is being developed and/or it is necessary to use the events feature.
|
| Transport (declared in TRORemoteDataModule) |
|
Provides access to the transport object that processes the current network (or other) connection to the server. Various information, such as client IP address, can be available via the transport objects.
|
Instance Methods
| constructor Create override (declared in TDataAbstractService) |
|---|
|
Standard component constructor.
|
| destructor Destroy override (declared in TDataAbstractService) |
|
|
| _AddRef protected virtual stdcall (declared in TRORemoteDataModule) |
|
Increments the reference counter of the instance. Avoid calling this method unless necessary.
|
| _OnActivate protected (declared in TRORemoteDataModule) |
|
Called just after the service is created and before any service method is called. Don't override this method, use the OnActivate event instead.
|
| _OnDeactivate protected (declared in TRORemoteDataModule) |
|
Called after the service method completes and before the service instance is freed. Don't override this method, use the OnDeactivate event instead.
|
| _Release protected virtual stdcall (declared in TRORemoteDataModule) |
|
Decrements the reference counter of the instance. Avoid calling this method unless necessary.
|
| AllowRemoteEventsRegistration protected (declared in TRORemoteDataModule) |
|
Obsolete, replaced by the LegacyEvents property.
|
| Assign override |
|
|
| Check protected (declared in TDataAbstractService) |
|
Validates TDataAbstractService properties.
|
| CheckForConnectionManager (declared in TDataAbstractService) |
|
Validates ServiceSchema.ConnectionManager property.
|
| CreateSession (declared in TRORemoteDataModule) |
|
Creates a new session object and makes it available via the Session property. As a rule, there is no need to call this method because the session is created automatically when required.
|
| CustomRequireSession protected virtual (declared in TRORemoteDataModule) |
|
Internal use only, don't override.
|
| DestroySession (declared in TRORemoteDataModule) |
|
Destroys the current session object. This method is primarily used to destroy the session in case of unsuccessful client authentication.
|
| DoBeforeGetDatasetData protected virtual (declared in TDataAbstractService) |
|
Fires BeforeGetDatasetData event.
|
| DoBeforeGetDatasetSchema protected (declared in TDataAbstractService) |
|
Fires BeforeGetDatasetSchema event.
|
| DoCommitTransaction protected virtual (declared in TDataAbstractService) |
|
Commits transaction, fires OnUpdateDataCommitTransaction event and related Business Rules Scripting Events
|
| DoOnActivate protected virtual (declared in TRORemoteDataModule) |
|
Internal use only, don't override. Use the OnActivate event instead.
|
| DoOnDeactivate protected override (declared in TDataAbstractService) |
|
Destroys default connection.
|
| DoRollbackTransaction protected virtual (declared in TDataAbstractService) |
|
Rollbacks transaction, fires OnUpdateDataRollBackTransaction event and related Business Rules Scripting Events
|
| DoStartTransaction protected virtual (declared in TDataAbstractService) |
|
Starts transaction, fires OnUpdateDataBeginTransaction event and related Business Rules Scripting Events
|
| DoValidateCommandAccess protected (declared in TDataAbstractService) |
|
Fires ValidateCommandExecution event and related Business Rules Scripting Events
|
| DoValidateDataTableAccess protected (declared in TDataAbstractService) |
|
Fires ValidateDatasetAccess event and related Business Rules Scripting Events
|
| DoValidateDirectSQLAccess protected (declared in TDataAbstractService) |
|
Fires ValidateDirectSQLAccess event and related Business Rules Scripting Events
|
| ExecuteCommand protected (declared in TDataAbstractService) |
|
Executes specified command
|
| ExecuteCommandEx protected (declared in TDataAbstractService) |
|
Executes specified command
|
| GetCommandSchema protected (declared in TDataAbstractService) |
|
Returns the definitions of the schema commands identified by the names passed through the parameter.
|
| GetConnectionForObject protected virtual (declared in TDataAbstractService) |
|
Returns connection for specified object
|
| GetData protected (declared in TDataAbstractService) |
|
Returns a stream that includes the data of all data tables indicated in the first parameter. Each data table can return a different number of rows or be opened using specific parameters that are passed as TableInfoRequest in the second parameter. This method provides the primary means of fetching data from the server to the client, and is invoked when the Fill method is called on a client-side TDARemoteDataAdapter component.
|
| GetDatasetScripts protected (declared in TDataAbstractService) |
|
Returns client-side Business Rules scripts in xml format
|
| GetDispatchInfo protected virtual (declared in TRORemoteDataModule) |
|
Fires the OnGetDipsatchInfo event. For internal use only, don't call or override.
|
| GetEventsData protected (declared in TRORemoteDataModule) |
|
Collects events data to the memory stream. For internal use only, don't call or override.
|
| GetSchema protected (declared in TDataAbstractService) |
|
Returns the schema referenced by the service to the calling client application, as XML.
|
| GetScriptContext protected virtual (declared in TDataAbstractService) |
|
Returns Business Rules script content
|
| GetTableSchema protected (declared in TDataAbstractService) |
|
Returns the definitions of the schema data tables identified by the names passed through the parameter.
|
| IsRetained protected (declared in TRORemoteDataModule) |
|
For internal use only.
|
| Loaded protected override (declared in TDataAbstractService) |
|
Initializes the component after the form file has been read into memory.
|
| Login protected |
|
|
| LoginEx protected override |
|
|
| Logout protected (declared in TBaseLoginService) |
|
|
| Notification protected override (declared in TDataAbstractService) |
|
For internal use only.
|
| QueryInterface protected override (declared in TRORemoteDataModule) |
|
For internal use only, this method is required for COM.
|
| RegisterEventClient (AnsiString, AnsiString) protected overload (declared in TRORemoteDataModule) |
|
Registers the client to receive server callback events of the specified type. Must be called for every client that needs to receive events in LegacyEvents = false mode.
|
| RegisterEventClient (TGUID, AnsiString) protected overload (declared in TRORemoteDataModule) |
|
|
| RegisterEventClient (TROSession, AnsiString) protected overload (declared in TRORemoteDataModule) |
|
|
| RegisterForDataChangeNotification protected (declared in TDataAbstractService) |
|
Registers a new table which will be refreshed automatically after other users apply changes to it. This method isn't implemented yet!
|
| ReleaseConnection (declared in TDataAbstractService) |
|
Releases any connection currently acquired in the Connection property.
|
| ReleaseObject protected (declared in TRORemoteDataModule) |
|
For internal use only.
|
| RetainObject protected (declared in TRORemoteDataModule) |
|
For internal use only.
|
| ServiceValidateRoles protected (declared in TRORemoteDataModule) |
|
|
| SimpleGetData protected virtual (declared in TDataAbstractService) |
|
Simplified GetData method that is used in Odata calls
|
| SimpleUpdateData protected virtual (declared in TDataAbstractService) |
|
Simplified UpdateData method that is used in Odata calls
|
| SQLExecuteCommand protected (declared in TDataAbstractService) |
|
Executes the passed SQL statement as a command. Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls. The AllowExecuteCommands property is set False by default, to prevent SQL commands from being executed.
|
| SQLExecuteCommandEx protected (declared in TDataAbstractService) |
|
Executes the passed SQL statement as a command. Supports Dynamic Where feature. Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls. The AllowExecuteCommands property is set False by default, to prevent SQL commands from being executed.
|
| SQLGetData protected (declared in TDataAbstractService) |
|
Executes the passed SQL statement and returns the record set as streamed data table. Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls. The AllowExecuteCommands property is set false by default, to prevent SQL commands from being executed.
|
| SQLGetDataEx protected (declared in TDataAbstractService) |
|
Executes the passed SQL statement and returns the record set as streamed data table. Supports Dynamic Where feature. Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls. The AllowExecuteCommands property is set false by default, to prevent SQL commands from being executed.
|
| UnregisterEventClient protected (declared in TRORemoteDataModule) |
|
The action is opposite to RegisterEventClient, it cancels the subscription. Unregistration is not absolutely necessary as the client session dies after some time of inactivity but allows to conserve some system resources.
|
| UnregisterForDataChangeNotification protected (declared in TDataAbstractService) |
|
Unregisters a table that was registered by the RegisterForDataChangeNotification method. This method isn't implemented yet!
|
| UpdateData protected (declared in TDataAbstractService) |
|
Applies the deltas encoded in the passed stream to the database and returns a stream that includes status information about the applied updates and possibly refreshed data for the client. This method provides the primary means of applying data updates from the client back to the server, and is invoked when the Update method is called on a client-side remote data adapter component.
|
Events
| AfterAcquireConnection (declared in TDataAbstractService) |
|---|
|
Fires right after a new connection is acquired through the Connection property. Use this event to make perform initializations on the new connection, such as opening a transaction, or setting connection options.
|
| AfterExecuteCommand (declared in TDataAbstractService) |
|
Fires right after a command was executed.
|
| AfterGetDatasetData (declared in TDataAbstractService) |
|
Fires right after data for a dataset (data table) was retrieved.
|
| AfterGetDatasetSchema (declared in TDataAbstractService) |
|
Fires right after schema info for a dataset (data table) was retrieved.
|
| AfterProcessDeltas (declared in TDataAbstractService) |
|
Fires right after deltas for a data table have been processed.
|
| AfterReleaseConnection (declared in TDataAbstractService) |
|
Fires right after a connection is released.
|
| BeforeAcquireConnection (declared in TDataAbstractService) |
|
Fires just before a new connection is acquired through the Connection property. Use this event to make last-minute configurations before the connection will be acquired, such as changing the ConnectionName.
|
| BeforeExecuteCommand (declared in TDataAbstractService) |
|
Fires just before a command will be executed.
|
| BeforeExecuteDeltaCommand (declared in TDataAbstractService) |
|
Fires just before a delta command will be executed.
|
| BeforeGetDatasetData (declared in TDataAbstractService) |
|
Fires just before data for a dataset (data table) is retrieved.
|
| BeforeGetDatasetSchema (declared in TDataAbstractService) |
|
Fires just before schema info for a dataset (data table) is retrieved.
|
| BeforeProcessDeltas (declared in TDataAbstractService) |
|
Fires just before deltas for a data table will be processed.
|
| BeforeReleaseConnection (declared in TDataAbstractService) |
|
Fires just before the connection is released. Use this event to perform any finalization tasks on the new connection, such as closing a transaction, or setting connection options.
|
| OnAcquireConnectionFailure (declared in TDataAbstractService) |
|
Fired when acquiring a connection failed.
|
| OnActivate (declared in TRORemoteDataModule) |
|
Called just after the service is created and before any service method is called. Handle this event for everything you need to do when the service instance is created.
|
| OnBeforeRegisterEventClient (declared in TRORemoteDataModule) |
|
Called when the new client is being registered to receive events. Deprecated now, since remote event (un-)registration is forbidden (LegacyEvents = false).
|
| OnBeforeUnregisterEventClient (declared in TRORemoteDataModule) |
|
Called when the client is being unsubscribed from events. Deprecated now, since remote event (un-)registration is forbidden (LegacyEvents = false).
|
| OnBusinessProcessorAutoCreated (declared in TDataAbstractService) |
|
Fires whenever a new TDABusinessProcessor was auto-created to process deltas. You can use this event to perform additional configuration on the Business Processor before it will be used.
|
| OnDeactivate (declared in TRORemoteDataModule) |
|
Called after the service method completes and before the service instance is freed. Handle this event to perform actions on service destruction, such as disposing of resources.
|
| OnGetDispatchInfo (declared in TRORemoteDataModule) |
|
This event is fired before the invoker executes the service method. Handle this event to preview remote methods about to be executed; the input parameters allow to get all information about the upcoming call including the remote method parameters and the calling client transport object.
|
| OnGetSchemaAsXMLEvent (declared in TDataAbstractService) |
|
Fires whenever a client retrieves the ServiceSchema. You can use this event to manually adjust or filter the Schema XML before it will be returned to the client.
|
| OnLogin |
|
Implements this event handler to provide the actual login procedure. Ideally this method should:
Skeleton code for the event handler will automatically be created for you if you select the Simple Login template when starting a new project.
|
| OnLogout (declared in TBaseLoginService) |
|
Implement this event handler to provide the actual logout procedure.
|
| OnProcessDeltasError (declared in TDataAbstractService) |
|
Fires if an error occurred while processing deltas. Among other things, you can use this event to determine whether processing of the remaining delta changes should continue, or if all changes should be rejected.
|
| OnUnknownMacroVariable (declared in TDataAbstractService) |
|
Fires when unknown macro variable is found. it can be usable when user-defined variables are used inside sql or Dynamic Where expression.
|
| OnUpdateDataBeginTransaction (declared in TDataAbstractService) |
|
Fires when a transaction will be started for processing a new set of deltas. You can handle this event to determine if the transaction should be started (default) or not.
|
| OnUpdateDataCommitTransaction (declared in TDataAbstractService) |
|
Fires when a transaction used for processing deltas will be committed. You can handle this event to determine if the transaction should be committed (default) or not.
|
| OnUpdateDataRollBackTransaction (declared in TDataAbstractService) |
|
Fires when a transaction used for processing deltas will be rolled back due to errors. You can handle this event to determine if the transaction should be rolled back (default) or not.
|
| OnValidateRoles (declared in TRORemoteDataModule) |
|
|
| ValidateCommandExecution (declared in TDataAbstractService) |
|
Fires before a command is executed. You can use this event handler to do validation, for example to check if the current user is allowed to execute the command in question, and raise an exception if the operation should be aborted.
|
| ValidateDatasetAccess (declared in TDataAbstractService) |
|
Fires before a data access retrieves data tables. You can use this event handler to do validation, for example to check if the current user is allowed to access the data table(s) in question, and raise an exception if the data access should be aborted.
|
| ValidateDirectSQLAccess (declared in TDataAbstractService) |
|
Fires before a SQL command is executed. You can use this event handler to do validation, for example to check if the current user is allowed to execute the command in question, and raise an exception if the operation should be aborted.
|
See Also
- TMultiDbLoginService
- Lists
- Data Abstract for Delphi: Interfaces — Classes — Enums — Aliases — Implements
- RemObjects SDK for Delphi: Interfaces — Classes — Aliases — Implements
- Data Abstract shared: Data Types – File Types
- other editions:
- Data Abstract for .NET: Namespaces — Interfaces — Classes — Enums — Implements
- Data Abstract for Xcode: Protocols — Classes — Enums — Implements
- Data Abstract for Java: Namespaces — Interfaces — Classes — Enums — Implements
- Data Abstract for JavaScript: Objects
- Data Abstract for Delphi: Interfaces — Classes — Enums — Aliases — Implements

Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode