Record Class OAuth2ClientConfig
java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.extension.template.auth.OAuth2ClientConfig
- All Implemented Interfaces:
AuthConfig
public record OAuth2ClientConfig(String tokenUrl, String clientId, String clientSecret, String scope, String audience, OAuth2ClientConfig.ClientAuthMethod clientAuthMethod)
extends Record
implements AuthConfig
Configuration for OAuth2 Client Credentials flow.
- Since:
- 2025-02-06
- Author:
- Process Builder Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionOAuth2ClientConfig(String tokenUrl, String clientId, String clientSecret) OAuth2ClientConfig(String tokenUrl, String clientId, String clientSecret, String scope) OAuth2ClientConfig(String tokenUrl, String clientId, String clientSecret, String scope, String audience, OAuth2ClientConfig.ClientAuthMethod clientAuthMethod) Creates an instance of aOAuth2ClientConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaudience()Returns the value of theaudiencerecord component.static OAuth2ClientConfig.Builderbuilder()Returns the value of theclientAuthMethodrecord component.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 OAuth2ClientConfigfromJson(com.fasterxml.jackson.databind.JsonNode node) Gets the authentication type identifier.final inthashCode()Returns a hash code value for this object.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.
-
Constructor Details
-
OAuth2ClientConfig
public OAuth2ClientConfig(String tokenUrl, String clientId, String clientSecret, String scope, String audience, OAuth2ClientConfig.ClientAuthMethod clientAuthMethod) Creates an instance of aOAuth2ClientConfigrecord class.- Parameters:
tokenUrl- the value for thetokenUrlrecord componentclientId- the value for theclientIdrecord componentclientSecret- the value for theclientSecretrecord componentscope- the value for thescoperecord componentaudience- the value for theaudiencerecord componentclientAuthMethod- the value for theclientAuthMethodrecord component
-
OAuth2ClientConfig
-
OAuth2ClientConfig
-
-
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
-
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
audience
Returns the value of theaudiencerecord component.- Returns:
- the value of the
audiencerecord component
-
clientAuthMethod
Returns the value of theclientAuthMethodrecord component.- Returns:
- the value of the
clientAuthMethodrecord component
-