Package com.rapid7.appspider.models
Class AuthenticationModel
- java.lang.Object
- 
- com.rapid7.appspider.models.AuthenticationModel
 
- 
 public class AuthenticationModel extends Object Storage class containing all the information need to authenticate
- 
- 
Constructor SummaryConstructors Constructor Description AuthenticationModel(String username, String password)instantiates a new instance of theAuthenticationModelclass with no client IdAuthenticationModel(String username, String password, String clientId)instantiates a new instance of theAuthenticationModelclass ensuring that username and password are both non-null and non-empty
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthenticationModelcreateInstanceOrThrow(String username, String password, String clientId)StringgetClientId()Gets the client id if present; otherwise throws aNoSuchElementExceptionStringgetPassword()gets the password valueStringgetUsername()Get the username valuebooleanhasClientId()Returns whether this object contains a clientId or not
 
- 
- 
- 
Method Detail- 
createInstanceOrThrowpublic static AuthenticationModel createInstanceOrThrow(String username, String password, String clientId) 
 - 
getPasswordpublic String getPassword() gets the password value- Returns:
- password as a Secret
 
 - 
getUsernamepublic String getUsername() Get the username value- Returns:
- username as a String
 
 - 
hasClientIdpublic boolean hasClientId() Returns whether this object contains a clientId or notshould be called prior to getClientIdto ensure a value is present, otherwise an exception may occur- Returns:
- true if client id is set; otherwise, false
 
 - 
getClientIdpublic String getClientId() throws NoSuchElementException Gets the client id if present; otherwise throws aNoSuchElementException- Returns:
- the client Id if present
- Throws:
- NoSuchElementException- if this instance does not have a clientId
 
 
- 
 
-