Class IssuerCreateParams.Jwks
-
- All Implemented Interfaces:
public final class IssuerCreateParams.JwksHow signing keys are obtained. Defaults to OIDC discovery.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceIssuerCreateParams.Jwks.VisitorAn interface that defines how to map each variant of Jwks to a value of type T.
public final classIssuerCreateParams.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 IssuerCreateParams.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(IssuerCreateParams.Jwks.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final IssuerCreateParams.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 IssuerCreateParams.JwksofDiscovery(BetaJwksDiscovery discovery)JWKS via the issuer's OIDC discovery document. final static IssuerCreateParams.JwksofExplicitUrl(BetaJwksExplicitUrl explicitUrl)JWKS fetched from a fixed endpoint. final static IssuerCreateParams.JwksofExplicitUrl(String url)Returns an immutable instance of Jwks whose ofExplicitUrl variant is built from the given required url. final static IssuerCreateParams.JwksofInline(BetaJwksInline inline)JWKS supplied directly; no network fetch. final static IssuerCreateParams.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 IssuerCreateParams.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(IssuerCreateParams.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 IssuerCreateParams.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 IssuerCreateParams.Jwks ofDiscovery(BetaJwksDiscovery discovery)
JWKS via the issuer's OIDC discovery document.
-
ofExplicitUrl
final static IssuerCreateParams.Jwks ofExplicitUrl(BetaJwksExplicitUrl explicitUrl)
JWKS fetched from a fixed endpoint.
-
ofExplicitUrl
final static IssuerCreateParams.Jwks ofExplicitUrl(String url)
Returns an immutable instance of Jwks whose ofExplicitUrl variant is built from the given required url.
-
ofInline
final static IssuerCreateParams.Jwks ofInline(BetaJwksInline inline)
JWKS supplied directly; no network fetch.
-
ofInline
final static IssuerCreateParams.Jwks ofInline(List<BetaJwksInline.Key> keys)
-
-
-
-