Record Class RestAuthConfig.OAuth2ClientCredentials
java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.records.RestAuthConfig.OAuth2ClientCredentials
- Record Components:
tokenUrl- The token endpoint URLclientId- The client IDclientSecret- The client secretscope- Optional scope(s) to requestaudience- Optional audience (for Auth0, etc.)clientAuthMethod- How to send client credentials (BODY or HEADER)
- All Implemented Interfaces:
RestAuthConfig
- Enclosing interface:
- RestAuthConfig
public static record RestAuthConfig.OAuth2ClientCredentials(String tokenUrl, String clientId, String clientSecret, String scope, String audience, RestOAuth2ClientAuthMethod clientAuthMethod)
extends Record
implements RestAuthConfig
OAuth 2.0 Client Credentials authentication configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.bonitasoft.processbuilder.records.RestAuthConfig
RestAuthConfig.ApiKeyAuth, RestAuthConfig.BasicAuth, RestAuthConfig.BearerAuth, RestAuthConfig.CustomAuth, RestAuthConfig.NoAuth, RestAuthConfig.OAuth2ClientCredentials, RestAuthConfig.OAuth2Password -
Constructor Summary
ConstructorsConstructorDescriptionOAuth2ClientCredentials(String tokenUrl, String clientId, String clientSecret, String scope, String audience, RestOAuth2ClientAuthMethod clientAuthMethod) Creates an instance of aOAuth2ClientCredentialsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaudience()Returns the value of theaudiencerecord component.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.Generates the HTTP headers required for this authentication.Gets the authentication type for this configuration.Gets the body parameters for the token request.Gets the headers for the token request (not the API request).final inthashCode()Returns a hash code value for this object.scope()Returns the value of thescoperecord component.tokenUrl()Returns the value of thetokenUrlrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.bonitasoft.processbuilder.records.RestAuthConfig
getAuthQueryParams
-
Constructor Details
-
OAuth2ClientCredentials
public OAuth2ClientCredentials(String tokenUrl, String clientId, String clientSecret, String scope, String audience, RestOAuth2ClientAuthMethod clientAuthMethod) Creates an instance of aOAuth2ClientCredentialsrecord 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
-
-
Method Details
-
getAuthType
Description copied from interface:RestAuthConfigGets the authentication type for this configuration.- Specified by:
getAuthTypein interfaceRestAuthConfig- Returns:
- The authentication type
-
getAuthHeaders
Description copied from interface:RestAuthConfigGenerates the HTTP headers required for this authentication.- Specified by:
getAuthHeadersin interfaceRestAuthConfig- Returns:
- Map of header name to header value
-
getTokenRequestHeaders
Gets the headers for the token request (not the API request).- Returns:
- Headers for token endpoint
-
getTokenRequestBody
Gets the body parameters for the token request.- Returns:
- Form parameters for token endpoint
-
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
-