Class BetaFederationIssuer.Jwks
-
- All Implemented Interfaces:
public final class BetaFederationIssuer.JwksHow signing keys are obtained for signature verification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaFederationIssuer.Jwks.VisitorAn interface that defines how to map each variant of Jwks to a value of type T.
public final classBetaFederationIssuer.Jwks.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaJwksDiscovery>discovery()JWKS via the issuer's OIDC discovery document. final Optional<BetaJwksExplicitUrl>explicitUrl()JWKS fetched from a fixed endpoint. final Optional<BetaJwksInline>inline()JWKS supplied directly; no network fetch. final Optional<JsonValue>_json()final BetaFederationIssuer.Jwks.Typetype()final Optional<String>caCertPem()final BooleanisDiscovery()final BooleanisExplicitUrl()final BooleanisInline()final BetaJwksDiscoveryasDiscovery()JWKS via the issuer's OIDC discovery document. final BetaJwksExplicitUrlasExplicitUrl()JWKS fetched from a fixed endpoint. final BetaJwksInlineasInline()JWKS supplied directly; no network fetch. final <T extends Any> Taccept(BetaFederationIssuer.Jwks.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaFederationIssuer.Jwksvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaFederationIssuer.JwksofDiscovery(BetaJwksDiscovery discovery)JWKS via the issuer's OIDC discovery document. final static BetaFederationIssuer.JwksofExplicitUrl(BetaJwksExplicitUrl explicitUrl)JWKS fetched from a fixed endpoint. final static BetaFederationIssuer.JwksofExplicitUrl(String url)Returns an immutable instance of Jwks whose ofExplicitUrl variant is built from the given required url. final static BetaFederationIssuer.JwksofInline(BetaJwksInline inline)JWKS supplied directly; no network fetch. final static BetaFederationIssuer.JwksofInline(List<BetaJwksInline.Key> keys)Returns an immutable instance of Jwks whose ofInline variant is built from the given required keys. -
-
Method Detail
-
discovery
final Optional<BetaJwksDiscovery> discovery()
JWKS via the issuer's OIDC discovery document.
-
explicitUrl
final Optional<BetaJwksExplicitUrl> explicitUrl()
JWKS fetched from a fixed endpoint.
-
inline
final Optional<BetaJwksInline> inline()
JWKS supplied directly; no network fetch.
-
type
final BetaFederationIssuer.Jwks.Type type()
-
isDiscovery
final Boolean isDiscovery()
-
isExplicitUrl
final Boolean isExplicitUrl()
-
asDiscovery
final BetaJwksDiscovery asDiscovery()
JWKS via the issuer's OIDC discovery document.
-
asExplicitUrl
final BetaJwksExplicitUrl asExplicitUrl()
JWKS fetched from a fixed endpoint.
-
asInline
final BetaJwksInline asInline()
JWKS supplied directly; no network fetch.
-
accept
final <T extends Any> T accept(BetaFederationIssuer.Jwks.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = jwks.accept(new Jwks.Visitor<Optional<String>>() { @Override public Optional<String> visitDiscovery(BetaJwksDiscovery discovery) { return Optional.of(discovery.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaFederationIssuer.Jwks validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofDiscovery
final static BetaFederationIssuer.Jwks ofDiscovery(BetaJwksDiscovery discovery)
JWKS via the issuer's OIDC discovery document.
-
ofExplicitUrl
final static BetaFederationIssuer.Jwks ofExplicitUrl(BetaJwksExplicitUrl explicitUrl)
JWKS fetched from a fixed endpoint.
-
ofExplicitUrl
final static BetaFederationIssuer.Jwks ofExplicitUrl(String url)
Returns an immutable instance of Jwks whose ofExplicitUrl variant is built from the given required url.
-
ofInline
final static BetaFederationIssuer.Jwks ofInline(BetaJwksInline inline)
JWKS supplied directly; no network fetch.
-
ofInline
final static BetaFederationIssuer.Jwks ofInline(List<BetaJwksInline.Key> keys)
-
-
-
-