Record Class BasicAuthConfig
java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.extension.template.auth.BasicAuthConfig
- All Implemented Interfaces:
AuthConfig
public record BasicAuthConfig(String username, String password, boolean preemptive)
extends Record
implements AuthConfig
Configuration for HTTP Basic Authentication.
- Since:
- 2025-02-06
- Author:
- Process Builder Team
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBasicAuthConfig(String username, String password) BasicAuthConfig(String username, String password, boolean preemptive) Creates an instance of aBasicAuthConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BasicAuthConfig.Builderbuilder()final booleanIndicates whether some other object is "equal to" this one.static BasicAuthConfigfromJson(com.fasterxml.jackson.databind.JsonNode node) Gets the authentication type identifier.final inthashCode()Returns a hash code value for this object.password()Returns the value of thepasswordrecord component.booleanReturns the value of thepreemptiverecord component.com.fasterxml.jackson.databind.JsonNodetoJson(com.fasterxml.jackson.databind.ObjectMapper mapper) Converts this configuration to a JSON node for storage.com.fasterxml.jackson.databind.JsonNodetoJsonEncrypted(com.fasterxml.jackson.databind.ObjectMapper mapper) Converts this configuration to a JSON node with sensitive fields encrypted.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
BasicAuthConfig
-
BasicAuthConfig
Creates an instance of aBasicAuthConfigrecord class.- Parameters:
username- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentpreemptive- the value for thepreemptiverecord component
-
-
Method Details
-
getAuthType
Description copied from interface:AuthConfigGets the authentication type identifier.- Specified by:
getAuthTypein interfaceAuthConfig- Returns:
- The authentication type string (lowercase)
-
toJson
public com.fasterxml.jackson.databind.JsonNode toJson(com.fasterxml.jackson.databind.ObjectMapper mapper) Description copied from interface:AuthConfigConverts this configuration to a JSON node for storage.- Specified by:
toJsonin interfaceAuthConfig- Parameters:
mapper- The ObjectMapper to use for JSON creation- Returns:
- JSON representation of this configuration
-
toJsonEncrypted
public com.fasterxml.jackson.databind.JsonNode toJsonEncrypted(com.fasterxml.jackson.databind.ObjectMapper mapper) Description copied from interface:AuthConfigConverts this configuration to a JSON node with sensitive fields encrypted.- Specified by:
toJsonEncryptedin interfaceAuthConfig- Parameters:
mapper- The ObjectMapper to use for JSON creation- Returns:
- JSON representation with encrypted sensitive fields
-
fromJson
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
preemptive
public boolean preemptive()Returns the value of thepreemptiverecord component.- Returns:
- the value of the
preemptiverecord component
-