Welcome to Login Page’s documentation!¶
Read Me:
Login Page¶
- js_generator.login() tuple¶
Takes
USERNAMEandPASSWORDfrom environment variables.Prompts for
UsernameandPasswordif not found inenv vars.- Returns
A tuple of the
usernameandpassword.- Return type
tuple
- js_generator.obfuscate(temp_file: str, js_file: str = 'login-page.js') str¶
Command to obfuscate the
JavaScriptand 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
JavaScriptobfuscator command.- Return type
str
- js_generator.raw_js() str¶
Raw JavaScript for login page - client side authentication.
- Returns
JavaScript with placeholder values for
UsernameandPassword.- Return type
str
- js_generator.trigger() None¶
Controller for rest of the functions.
- js_generator.login()¶
to get the
UsernameandPassword
- js_generator.raw_js()¶
to get the
JavaScriptwith replaced placeholder values.
- js_generator.obfuscate()¶
to get the command to obfuscate.
Removes the temp file once the
JavaScriptis generated. Opens theindex.htmlin a web browser.