Record Class ApiKeyAuthConfig
java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.extension.template.auth.ApiKeyAuthConfig
- All Implemented Interfaces:
AuthConfig
public record ApiKeyAuthConfig(String keyName, String keyValue, ApiKeyAuthConfig.Location location)
extends Record
implements AuthConfig
Configuration for API Key Authentication.
- Since:
- 2025-02-06
- Author:
- Process Builder Team
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionApiKeyAuthConfig(String keyName, String keyValue) ApiKeyAuthConfig(String keyName, String keyValue, ApiKeyAuthConfig.Location location) Creates an instance of aApiKeyAuthConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ApiKeyAuthConfigfromJson(com.fasterxml.jackson.databind.JsonNode node) Gets the authentication type identifier.final inthashCode()Returns a hash code value for this object.static ApiKeyAuthConfigkeyName()Returns the value of thekeyNamerecord component.keyValue()Returns the value of thekeyValuerecord component.location()Returns the value of thelocationrecord component.static ApiKeyAuthConfigqueryParam(String keyName, String keyValue) 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.
-
Constructor Details
-
ApiKeyAuthConfig
Creates an instance of aApiKeyAuthConfigrecord class.- Parameters:
keyName- the value for thekeyNamerecord componentkeyValue- the value for thekeyValuerecord componentlocation- the value for thelocationrecord component
-
ApiKeyAuthConfig
-
-
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
-
queryParam
-
header
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
keyName
Returns the value of thekeyNamerecord component.- Returns:
- the value of the
keyNamerecord component
-
keyValue
Returns the value of thekeyValuerecord component.- Returns:
- the value of the
keyValuerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-