Package org.a2aproject.sdk.spec
Record Class OAuthFlows
java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.OAuthFlows
- Record Components:
- OAuth 2.0 authorization code flow configurationclientCredentials- OAuth 2.0 client credentials flow configurationdeviceCode- OAuth 2.0 device code flow configuration
public record OAuthFlows(@Nullable AuthorizationCodeOAuthFlow authorizationCode, @Nullable ClientCredentialsOAuthFlow clientCredentials, @Nullable DeviceCodeOAuthFlow deviceCode)
extends Record
Configuration for supported OAuth 2.0 authorization flows.
This record specifies which OAuth 2.0 flows the agent supports and their configurations, including authorization and token endpoints, scopes, and refresh URLs.
All fields are optional; only the flows supported by the agent should be specified.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOAuthFlows(@Nullable AuthorizationCodeOAuthFlow authorizationCode, @Nullable ClientCredentialsOAuthFlow clientCredentials, @Nullable DeviceCodeOAuthFlow deviceCode) Creates an instance of aOAuthFlowsrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable AuthorizationCodeOAuthFlowReturns the value of theauthorizationCoderecord component.static OAuthFlows.Builderbuilder()Create a new Builder@Nullable ClientCredentialsOAuthFlowReturns the value of theclientCredentialsrecord component.@Nullable DeviceCodeOAuthFlowReturns the value of thedeviceCoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OAuthFlows
public OAuthFlows(@Nullable AuthorizationCodeOAuthFlow authorizationCode, @Nullable ClientCredentialsOAuthFlow clientCredentials, @Nullable DeviceCodeOAuthFlow deviceCode) Creates an instance of aOAuthFlowsrecord class.- Parameters:
authorizationCode- the value for theauthorizationCoderecord componentclientCredentials- the value for theclientCredentialsrecord componentdeviceCode- the value for thedeviceCoderecord component
-
-
Method Details
-
builder
Create a new Builder- Returns:
- the 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). -
authorizationCode
Returns the value of theauthorizationCoderecord component.- Returns:
- the value of the
authorizationCoderecord component
-
clientCredentials
Returns the value of theclientCredentialsrecord component.- Returns:
- the value of the
clientCredentialsrecord component
-
deviceCode
Returns the value of thedeviceCoderecord component.- Returns:
- the value of the
deviceCoderecord component
-