Package com.ebasetech.xi.services.auth
Class BasicAuthentication
java.lang.Object
com.ebasetech.xi.services.auth.BasicAuthentication
- All Implemented Interfaces:
Authentication
public class BasicAuthentication extends java.lang.Object implements Authentication
Basic Authentication holding the username and password for HTTP Basic Authentication
- Since:
- v5.1
-
Field Summary
Fields inherited from interface com.ebasetech.xi.services.Authentication
BASIC_AUTHENTICATION, DIGEST_AUTHENTICATION, GATEWAY_AUTHENTICATION, NTLM_AUTHENTICATION, OAUTH_AUTHENTICATION
-
Constructor Summary
Constructors Constructor Description BasicAuthentication()
-
Method Summary
Modifier and Type Method Description java.lang.String
getPassword()
Returns the password to be authenticatedint
getType()
Returns the Authentication type IDjava.lang.String
getUsername()
Returns the username to be authenticatedboolean
isPreemptive()
Returns whether preemptive Basic Authentication strategy is enabledvoid
setPassword(java.lang.String password)
Sets the password to be authenticatedvoid
setPreemptive(boolean preemptive)
BasicAuthentication does not support preemptive authentication out of the box, because if misused or used incorrectly the preemptive authentication can lead to significant security issues, such as sending user credentials in clear text to an unauthorized third party.void
setUsername(java.lang.String username)
Sets the username to be authenticatedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BasicAuthentication
public BasicAuthentication()
-
-
Method Details
-
getUsername
public java.lang.String getUsername()Returns the username to be authenticated- Since:
- v5.1
-
setUsername
public void setUsername(java.lang.String username)Sets the username to be authenticated- Since:
- v5.1
-
getPassword
public java.lang.String getPassword()Returns the password to be authenticated- Since:
- v5.1
-
setPassword
public void setPassword(java.lang.String password)Sets the password to be authenticated- Since:
- v5.1
-
setPreemptive
public void setPreemptive(boolean preemptive)BasicAuthentication does not support preemptive authentication out of the box, because if misused or used incorrectly the preemptive authentication can lead to significant security issues, such as sending user credentials in clear text to an unauthorized third party. Therefore, users are expected to evaluate potential benefits of preemptive authentication versus security risks in the context of their specific application environment. By setting preemptive to true, the Authorization header will always be sent with the request. Set preemptive Basic Authentication- Since:
- v5.13.4
-
isPreemptive
public boolean isPreemptive()Returns whether preemptive Basic Authentication strategy is enabled- Since:
- v5.13.4
- See Also:
setPreemptive(boolean)
-
getType
public int getType()Description copied from interface:Authentication
Returns the Authentication type ID- Specified by:
getType
in interfaceAuthentication
-