SecuritySchemeBuilder
Builder class for creating SecurityScheme instances.
This builder provides a fluent API for creating various types of security schemes supported by the A2A protocol, including the new mTLS and OAuth2 with metadata URL features introduced in version 0.3.0.
Example usage:
val oauth2Scheme = SecurityScheme.oauth2 {
metadataUrl = "https://auth.example.com/.well-known/oauth2"
flows {
authorizationCode {
authorizationUrl = "https://auth.example.com/oauth2/authorize"
tokenUrl = "https://auth.example.com/oauth2/token"
scopes = mapOf("read" to "Read access", "write" to "Write access")
}
}
}Content copied to clipboard
Functions
Link copied to clipboard
Creates an API Key security scheme.
Link copied to clipboard
Creates an HTTP security scheme.
Link copied to clipboard
Creates a Mutual TLS security scheme.
Link copied to clipboard
Creates an OAuth2 security scheme with optional metadata URL.
Link copied to clipboard
Creates an OpenID Connect security scheme.