Package org.a2aproject.sdk.spec
Record Class OpenIdConnectSecurityScheme
java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.OpenIdConnectSecurityScheme
- Record Components:
openIdConnectUrl- URL to the OpenID Connect Discovery document (required)description- optional description of the security scheme
- All Implemented Interfaces:
SecurityScheme
public record OpenIdConnectSecurityScheme(String openIdConnectUrl, @Nullable String description)
extends Record
implements SecurityScheme
OpenID Connect security scheme for agent authentication.
This security scheme uses OpenID Connect Discovery to automatically configure
authentication. The openIdConnectUrl must point to an OpenID Connect
Discovery document that describes the provider's configuration, including
authorization and token endpoints.
OpenID Connect builds on OAuth 2.0 to provide identity layer functionality, enabling clients to verify user identity and obtain basic profile information.
Example usage:
OpenIdConnectSecurityScheme scheme = OpenIdConnectSecurityScheme.builder()
.openIdConnectUrl("https://example.com/.well-known/openid-configuration")
.description("OpenID Connect authentication")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructing immutableOpenIdConnectSecuritySchemeinstances. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOpenIdConnectSecurityScheme(String openIdConnectUrl, @Nullable String description) Compact constructor with validation. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a new Builder@Nullable StringReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theopenIdConnectUrlrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the type of the security scheme.
-
Field Details
-
TYPE
The type identifier for OpenID Connect security schemes: "openIdConnect".- See Also:
-
-
Constructor Details
-
OpenIdConnectSecurityScheme
Compact constructor with validation.- Parameters:
openIdConnectUrl- URL to the OpenID Connect Discovery document (required)description- optional description of the security scheme- Throws:
IllegalArgumentException- if openIdConnectUrl is null
-
-
Method Details
-
type
Description copied from interface:SecuritySchemeReturns the type of the security scheme.- Specified by:
typein interfaceSecurityScheme- Returns:
- the type of the security scheme.
-
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). -
openIdConnectUrl
Returns the value of theopenIdConnectUrlrecord component.- Returns:
- the value of the
openIdConnectUrlrecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceSecurityScheme- Returns:
- the value of the
descriptionrecord component
-