Module: lib/init

Authenticates the user by prompting for Username and password

Source:
Source:

Methods

(inner) init() → {null}

The function does the following :
1. Checks if the user is already authenticated.
2. If the user is already authenticated it displays the time left in the session.
3. Prompts the user to enter credentials and checks if they are valid.
4. If the credentials are valid it displays the time left in the session and if not it displays error message.
Source:
Returns:
Type
null

(inner) init() → {null}

The function does the following :
1. Checks if the user is already authenticated.
2. If the user is already authenticated it displays the time left in the session.
3. Prompts the user to enter credentials and checks if they are valid.
4. If the credentials are valid it displays the time left in the session and if not it displays error message.
Source:
Returns:
Type
null

(inner) validate(string) → {bool|string}

Checks if the length of the entered string is greater than zero
Parameters:
Name Type Description
string value string entered by user on prompt
Source:
Returns:
  • True if the length of string entered is greater than zero
    Type
    bool
  • string prompting user to input username/password if length of username entered was null
    Type
    string

(inner) validate(string) → {bool|string}

Checks if the length of the entered string is greater than zero
Parameters:
Name Type Description
string value string entered by user on prompt
Source:
Returns:
  • True if the length of string entered is greater than zero
    Type
    bool
  • string prompting user to input username/password if length of username entered was null
    Type
    string

Authenticates the user by prompting for Username and password

Source:
Source:

Methods

(inner) init() → {null}

The function does the following :
1. Checks if the user is already authenticated.
2. If the user is already authenticated it displays the time left in the session.
3. Prompts the user to enter credentials and checks if they are valid.
4. If the credentials are valid it displays the time left in the session and if not it displays error message.
Source:
Returns:
Type
null

(inner) init() → {null}

The function does the following :
1. Checks if the user is already authenticated.
2. If the user is already authenticated it displays the time left in the session.
3. Prompts the user to enter credentials and checks if they are valid.
4. If the credentials are valid it displays the time left in the session and if not it displays error message.
Source:
Returns:
Type
null

(inner) validate(string) → {bool|string}

Checks if the length of the entered string is greater than zero
Parameters:
Name Type Description
string value string entered by user on prompt
Source:
Returns:
  • True if the length of string entered is greater than zero
    Type
    bool
  • string prompting user to input username/password if length of username entered was null
    Type
    string

(inner) validate(string) → {bool|string}

Checks if the length of the entered string is greater than zero
Parameters:
Name Type Description
string value string entered by user on prompt
Source:
Returns:
  • True if the length of string entered is greater than zero
    Type
    bool
  • string prompting user to input username/password if length of username entered was null
    Type
    string