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<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 IssuerCreateParams.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(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(JwksDiscovery discovery)JWKS via the issuer's OIDC discovery document. final static IssuerCreateParams.JwksofExplicitUrl(JwksExplicitUrl 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(JwksInline inline)JWKS supplied directly; no network fetch. final static IssuerCreateParams.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 IssuerCreateParams.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(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(JwksDiscovery 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(JwksDiscovery discovery)
JWKS via the issuer's OIDC discovery document.
-
ofExplicitUrl
final static IssuerCreateParams.Jwks ofExplicitUrl(JwksExplicitUrl 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(JwksInline inline)
JWKS supplied directly; no network fetch.
-
ofInline
final static IssuerCreateParams.Jwks ofInline(List<JwksInline.Key> keys)
-
-
-
-