Record Class OAuth2PasswordConfig
java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.extension.template.auth.OAuth2PasswordConfig
- All Implemented Interfaces:
AuthConfig
public record OAuth2PasswordConfig(String tokenUrl, String clientId, String clientSecret, String username, String password, String scope)
extends Record
implements AuthConfig
Configuration for OAuth2 Resource Owner Password Credentials flow.
- Since:
- 2025-02-06
- Author:
- Process Builder Team
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth2PasswordConfig.Builderbuilder()clientId()Returns the value of theclientIdrecord component.Returns the value of theclientSecretrecord component.final booleanIndicates whether some other object is "equal to" this one.static OAuth2PasswordConfigfromJson(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.scope()Returns the value of thescoperecord 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.tokenUrl()Returns the value of thetokenUrlrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
OAuth2PasswordConfig
public OAuth2PasswordConfig(String tokenUrl, String clientId, String clientSecret, String username, String password, String scope) Creates an instance of aOAuth2PasswordConfigrecord class.- Parameters:
tokenUrl- the value for thetokenUrlrecord componentclientId- the value for theclientIdrecord componentclientSecret- the value for theclientSecretrecord componentusername- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentscope- the value for thescoperecord component
-
OAuth2PasswordConfig
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
tokenUrl
Returns the value of thetokenUrlrecord component.- Returns:
- the value of the
tokenUrlrecord component
-
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
clientSecret
Returns the value of theclientSecretrecord component.- Returns:
- the value of the
clientSecretrecord component
-
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
-
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-