Class

LoginHandler

LoginHandler()

Constructor

# new LoginHandler()

This class extends the EventHandler to provide specific handling for login events. It validates the presence of username and password in the event data.

Handler for login events

View Source app/ew/handlers/LoginHandler.ts, line 17

Example
const loginHandler = new LoginHandler();
const event = {
  data: { username: 'user', password: 'pass' }
};
const isValid = await loginHandler.handle(event);
console.log(isValid); // true

Methods

# async handle(event) → {Promise.<boolean>}

This method extracts the username and password from the event data and checks if both are truthy values. It returns true if both username and password are present, false otherwise.

Handles the login event

Parameters:
Name Type Description
event ICrudFormEvent

The event object containing login data

View Source app/handlers/LoginHandler.ts, line 61

A promise that resolves to true if login is valid, false otherwise

Promise.<boolean>

LoginHandler()

Constructor

# new LoginHandler()

This class extends the EventHandler to provide specific handling for login events. It validates the presence of username and password in the event data.

Handler for login events

View Source app/handlers/LoginHandler.ts, line 18

Example
const loginHandler = new LoginHandler();
const event = {
  data: { username: 'user', password: 'pass' }
};
const isValid = await loginHandler.handle(event);
console.log(isValid); // true

Methods

# async handle(event) → {Promise.<boolean>}

This method extracts the username and password from the event data and checks if both are truthy values. It returns true if both username and password are present, false otherwise.

Handles the login event

Parameters:
Name Type Description
event ICrudFormEvent

The event object containing login data

View Source app/handlers/LoginHandler.ts, line 61

A promise that resolves to true if login is valid, false otherwise

Promise.<boolean>