Record Class BearerAuthConfig
java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.extension.template.auth.BearerAuthConfig
- All Implemented Interfaces:
AuthConfig
Configuration for Bearer Token Authentication.
- Since:
- 2025-02-06
- Author:
- Process Builder Team
-
Constructor Summary
ConstructorsConstructorDescriptionBearerAuthConfig(String token) Creates an instance of aBearerAuthConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static BearerAuthConfigfromJson(com.fasterxml.jackson.databind.JsonNode node) Gets the authentication type identifier.final inthashCode()Returns a hash code value for this object.static BearerAuthConfigcom.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.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BearerAuthConfig
Creates an instance of aBearerAuthConfigrecord class.- Parameters:
token- the value for thetokenrecord 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
-
of
-
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). -
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-