Welcome to Login Page’s documentation!¶
Login Page¶
- js_generator.login() tuple ¶
Takes
USERNAME
andPASSWORD
from environment variables.Prompts for
Username
andPassword
if not found inenv vars
.- Returns
A tuple of the
username
andpassword
.- Return type
tuple
- js_generator.obfuscate(temp_file: str, js_file: str = 'login-page.js') str ¶
Command to obfuscate the
JavaScript
and write it as a file.- Parameters
temp_file – Temporary file name which will be removed after obfuscation.
js_file – JavaScript file name that is referenced in
index.html
- Returns
JavaScript
obfuscator command.- Return type
str
- js_generator.raw_js() str ¶
Raw JavaScript for login page - client side authentication.
- Returns
JavaScript with placeholder values for
Username
andPassword
.- Return type
str
- js_generator.trigger() None ¶
Controller for rest of the functions.
- js_generator.login()¶
to get the
Username
andPassword
- js_generator.raw_js()¶
to get the
JavaScript
with replaced placeholder values.
- js_generator.obfuscate()¶
to get the command to obfuscate.
Removes the temp file once the
JavaScript
is generated. Opens theindex.html
in a web browser.