Class IssuerUpdateParams.Jwks
-
- All Implemented Interfaces:
public final class IssuerUpdateParams.JwksReplaces the entire JWKS configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceIssuerUpdateParams.Jwks.VisitorAn interface that defines how to map each variant of Jwks to a value of type T.
public final classIssuerUpdateParams.Jwks.Type
-
Method Summary
Modifier and Type Method Description final Optional<JwksDiscovery>discovery()JWKS via the issuer's OIDC discovery document. final Optional<JwksExplicitUrl>explicitUrl()JWKS fetched from a fixed endpoint. final Optional<JwksInline>inline()JWKS supplied directly; no network fetch. final Optional<JsonValue>_json()final IssuerUpdateParams.Jwks.Typetype()final Optional<String>caCertPem()final BooleanisDiscovery()final BooleanisExplicitUrl()final BooleanisInline()final JwksDiscoveryasDiscovery()JWKS via the issuer's OIDC discovery document. final JwksExplicitUrlasExplicitUrl()JWKS fetched from a fixed endpoint. final JwksInlineasInline()JWKS supplied directly; no network fetch. final <T extends Any> Taccept(IssuerUpdateParams.Jwks.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final IssuerUpdateParams.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 IssuerUpdateParams.JwksofDiscovery(JwksDiscovery discovery)JWKS via the issuer's OIDC discovery document. final static IssuerUpdateParams.JwksofExplicitUrl(JwksExplicitUrl explicitUrl)JWKS fetched from a fixed endpoint. final static IssuerUpdateParams.JwksofExplicitUrl(String url)Returns an immutable instance of Jwks whose ofExplicitUrl variant is built from the given required url. final static IssuerUpdateParams.JwksofInline(JwksInline inline)JWKS supplied directly; no network fetch. final static IssuerUpdateParams.JwksofInline(List<JwksInline.Key> keys)Returns an immutable instance of Jwks whose ofInline variant is built from the given required keys. -
-
Method Detail
-
discovery
final Optional<JwksDiscovery> discovery()
JWKS via the issuer's OIDC discovery document.
-
explicitUrl
final Optional<JwksExplicitUrl> explicitUrl()
JWKS fetched from a fixed endpoint.
-
inline
final Optional<JwksInline> inline()
JWKS supplied directly; no network fetch.
-
type
final IssuerUpdateParams.Jwks.Type type()
-
isDiscovery
final Boolean isDiscovery()
-
isExplicitUrl
final Boolean isExplicitUrl()
-
asDiscovery
final JwksDiscovery asDiscovery()
JWKS via the issuer's OIDC discovery document.
-
asExplicitUrl
final JwksExplicitUrl asExplicitUrl()
JWKS fetched from a fixed endpoint.
-
asInline
final JwksInline asInline()
JWKS supplied directly; no network fetch.
-
accept
final <T extends Any> T accept(IssuerUpdateParams.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(JwksDiscovery discovery) { return Optional.of(discovery.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final IssuerUpdateParams.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 IssuerUpdateParams.Jwks ofDiscovery(JwksDiscovery discovery)
JWKS via the issuer's OIDC discovery document.
-
ofExplicitUrl
final static IssuerUpdateParams.Jwks ofExplicitUrl(JwksExplicitUrl explicitUrl)
JWKS fetched from a fixed endpoint.
-
ofExplicitUrl
final static IssuerUpdateParams.Jwks ofExplicitUrl(String url)
Returns an immutable instance of Jwks whose ofExplicitUrl variant is built from the given required url.
-
ofInline
final static IssuerUpdateParams.Jwks ofInline(JwksInline inline)
JWKS supplied directly; no network fetch.
-
ofInline
final static IssuerUpdateParams.Jwks ofInline(List<JwksInline.Key> keys)
-
-
-
-