Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DDLogin ¶
type DDLogin struct { BaseURL *url.URL // The base URL for the DefectDojo install Username string // The user to login with Password string // The password for the user logging in BannerOn bool // True for login banner being on, false when not Browser *rod.Browser // Rod browser for this login session Page *rod.Page // Rod browser page Debug bool // True causes a 5 second delay before clicking the login button }
func (*DDLogin) NewSession ¶
NewSession logs into DefectDojo and creates a new Rod session to use to 'browse' DefectDojo
func (*DDLogin) SetAndLogin ¶
SetAndLogin is used to set the necessary values to login to DefectDojo using Rod. It takes three strings: a URL (u), a username (usr) and a password (p) and two booleans: b should be set to true if the login banner is on and d should be set to true if you want a 5 second delay before clicking the login button (for debug)
func (*DDLogin) SetBanner ¶
SetBanner takes a boolean (true/false) to set if the login banner is on (true) or off (false)
func (*DDLogin) SetDebug ¶
SetDebug takes a boolean. If set to true, it will pause for 5 seconds before it submits the provided credentials allowing you to see the login screen and optionally change the dev tools layout
func (*DDLogin) SetPassword ¶
SetPassword takes a string and sets the password to use for logging into DefectDojo
func (*DDLogin) SetURL ¶
SetURL takes a string and creates a url.URL struct returns an error if the URL provided cannot be parsed successfully String should be a URL like https://demo.defectdojo.org
func (*DDLogin) SetUsername ¶
SetUsername taks a string and sets the username to use for logging into DefectDojo