Class OAuthAuthorizationServer.Builder

java.lang.Object
com.revetsec.oauth.server.OAuthAuthorizationServer.Builder
Enclosing class:
OAuthAuthorizationServer

@NotThreadSafe @CheckReturnValue public static final class OAuthAuthorizationServer.Builder extends Object
Mutable, non-thread-safe issuer configuration. Keep the builder on one configuring thread; each build() snapshots its values so later setters do not change an already-built server. Application collaborators remain retained references and must satisfy their thread-safety, budget and lifetime contracts; the server does not copy or close them.

Required configuration has no inferred defaults: authorization, token and JWKS routes, client repository, authoritative store, signing-key provider, state sealer, grant policy and resource map. Null clears those required values. Revocation and introspection routes default absent; refresh defaults off and requires a revocation route when enabled. Collection setters replace complete values; resources(Map) snapshots the map and its scope sets rather than merging them.

Numeric setters accept a nullable value and defer bounds to build. In addition to each documented inclusive interval, code lifetime must not exceed interaction lifetime; with refresh enabled, access lifetime must not exceed idle lifetime, which must not exceed absolute lifetime. Skew must not exceed half the access lifetime, request timeout must not exceed total deadline, and the sealed record cap must fit the sealer. Resource counts and scope limits are checked against the copied map.

Configuration and construction do not call the repository, store, signing-key provider, grant policy or address resolver, sample the worker clock, perform network I/O/signing, or start owned threads. The explicit construction-time observer exception is OAuthServerObserver.didEnableLocalhostAnyPortRedirects() when that option is enabled. Build neither initializes persistence nor opens serving/recovery admission. The application owns trusted startup time, durable store qualification, keys, user authentication, consent, sessions/CSRF and HTTP routing. Construction success does not qualify that deployment.

Since:
1.0.0
  • Method Details

    • authorizationEndpoint

      Sets the required browser authorization route; there is no default. Null clears the required route, so the next build fails until it is supplied again. The route must use the issuer's scheme and exact raw authority, be distinct from every other configured route, and contain no user info, query or fragment. It is not inferred from the issuer or request headers. These checks run at build(); the application owns HTTP routing and TLS termination.
      Parameters:
      value - the exact absolute endpoint URI, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • tokenEndpoint

      Sets the required code-exchange and refresh token route; there is no default. Null clears the required route, so the next build fails until it is supplied again. The route must use the issuer's scheme and exact raw authority, be distinct from every other configured route, and contain no user info, query or fragment. It is not inferred from the issuer or request headers. These checks run at build(); the application owns HTTP routing and TLS termination.
      Parameters:
      value - the exact absolute endpoint URI, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • jwksEndpoint

      Sets the required public verification-key publication route; there is no default. Null clears the required route, so the next build fails until it is supplied again. The route must use the issuer's scheme and exact raw authority, be distinct from every other configured route, and contain no user info, query or fragment. It is not inferred from the issuer or request headers. These checks run at build(); the application owns HTTP routing and TLS termination.
      Parameters:
      value - the exact absolute endpoint URI, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • revocationEndpoint

      Sets the optional token-revocation route; the default and null mean absent. A route is required when refreshTokensEnabled(Boolean) is true. Without it, revocation is not advertised and the public revocation operation is unavailable; null does not select another route. The route must use the issuer's scheme and exact raw authority, be distinct from every other configured route, and contain no user info, query or fragment. It is not inferred from the issuer or request headers. These checks run at build(); the application owns HTTP routing and TLS termination.
      Parameters:
      value - the exact absolute revocation URI, or null for no route
      Returns:
      this builder
      Since:
      1.0.0
    • introspectionEndpoint

      Sets the optional resource-only introspection route; the default and null mean absent. Without it, introspection is not advertised and the public introspection operation is unavailable. The route must use the issuer's scheme and exact raw authority, be distinct from every other configured route, and contain no user info, query or fragment. It is not inferred from the issuer or request headers. These checks run at build(); the application owns HTTP routing and TLS termination.
      Parameters:
      value - the exact absolute introspection URI, or null for no route
      Returns:
      this builder
      Since:
      1.0.0
    • clientRepository

      Sets the required application-owned registered-client lookup; there is no default. Null clears it and makes the next build fail. The reference is retained, not copied or called during construction. It must be thread-safe and honor each operation's remaining cooperative budget. Exact registrations are consulted before opt-in client-ID metadata; a backend failure must not be reported as an unknown client. See OAuthServerClientRepository.
      Parameters:
      value - the registered-client repository, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • store

      Sets the required application-owned authoritative store; there is no default. Null clears it and makes the next build fail. The reference is retained without reading, writing or initializing a namespace during construction. The implementation must supply the coherent admitted time, atomic exact predicates, durability, recovery admission and permanent/replay retention required by OAuthAuthorizationServerStore; this setter supplies none of those deployment guarantees.
      Parameters:
      value - the authoritative issuer store, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • signingKeys

      Sets the required application-owned signing-key snapshot provider; there is no default. Null clears it and makes the next build fail. Construction retains the provider without invoking it, looking up keys or signing. Operations require coherent lifecycle snapshots and the issuer's RS256 profile. The application owns private-key protection, publication, rollover and retirement; changing the provider reference is not a key-migration or retention procedure. See OAuthIssuerKeyProvider.
      Parameters:
      value - the signing-key provider, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • stateSealer

      Sets the required application-owned state sealer; there is no default. Null clears it and makes the next build fail. The immutable sealer reference is retained. At build, maximumStoreRecordBytes(Integer) must not exceed its configured maximum sealed length. Sealing keys, old-key retention and coordinated rotation across writers remain application-owned; replacing the sealer does not migrate stored records or repair missing fences.
      Parameters:
      value - the configured state sealer, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • grantPolicy

      Sets the required application-owned continuing authorization policy; there is no default. Null clears it and makes the next build fail. Construction retains the thread-safe callback without invoking it. Approval, code exchange and refresh recheck current permissions under the remaining cooperative budget. A decision can deny or narrow authority; it cannot replace application login, session/CSRF protection or consent. See OAuthGrantPolicy.
      Parameters:
      value - the continuing grant policy, or null to clear it
      Returns:
      this builder
      Since:
      1.0.0
    • resources

      Replaces the required complete map of exact resource identifiers to allowed scope sets. There is no default; null clears the required map. Non-null maps and their scope sets are validated and defensively copied when set, rather than merged or retained. Resource identifiers are absolute, fragment-free URI spellings compared exactly and never fetched. The map must be nonempty; an empty scope set grants no authority. Carrier/aggregate ceilings are checked here; the selected maximumResources(Integer), maximumScopesPerResource(Integer) and maximumScopeLength(Integer) are checked at build. Per-client and grant policy can only narrow this configuration.
      Parameters:
      value - the complete resource/scope map, or null to clear it
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if the non-null replacement violates resource/scope carrier limits
      NullPointerException - if a non-null map contains a null key, scope set or scope
      Since:
      1.0.0
    • clientMetadataPolicy

      Selects opt-in client-ID metadata document (CIMD) policy. The default and null are OAuthClientMetadataPolicy.disabledInstance(); null disables CIMD, not registered clients. An enabled immutable policy retains its application resolver and explicit cache selection. Construction performs no resolution, cache access or HTTP fetch. Enabled CIMD requires the runtime floor described by acknowledgeUnpatchedRuntime(Boolean) and uses outboundUriPolicy(OutboundUriPolicy). Cache reuse is not authoritative credential storage or shared-deployment qualification. Exact registered clients still take precedence.
      Parameters:
      value - the complete metadata policy, or null to disable CIMD
      Returns:
      this builder
      Since:
      1.0.0
    • clock

      Sets the worker wall clock; the default and null select Clock.systemUTC(). The reference is retained without sampling it during construction. Operations use it for worker health checks, provisional key-lifecycle preparation and optional metadata-cache freshness. Timed authoritative state transitions use admitted store time and authenticated floors, not this clock as a fallback. Changing this clock neither establishes trusted startup time nor resets durable floors.
      Parameters:
      value - the application worker clock, or null to restore the system UTC clock
      Returns:
      this builder
      Since:
      1.0.0
    • outboundUriPolicy

      Selects the immutable outbound URI policy for opt-in CIMD address admission. The default and null select OutboundUriPolicy.publicAddressesOnlyInstance(). This is a restriction on approved metadata requests, not permission to fetch arbitrary client URLs. The pinned transport still enforces its address, redirect and TLS/hostname rules. This setting does not change issuer endpoint authority or any of the separate redirect/loopback options.
      Parameters:
      value - the outbound metadata URI policy, or null to restore the public-address policy
      Returns:
      this builder
      Since:
      1.0.0
    • observer

      Sets the application-owned synchronous issuer observer. The default and null select OAuthServerObserver.disabledInstance(). The reference is retained; hooks must be fast and thread-safe and follow the interface's failure-containment contract. Successful construction with allowLocalhostAnyPortRedirects(Boolean) enabled calls OAuthServerObserver.didEnableLocalhostAnyPortRedirects(); construction otherwise performs no issuer observer notification. This interface has no runtime-acknowledgment hook, and operation success events are checkpoints rather than credential-delivery receipts.
      Parameters:
      value - the issuer observer, or null to restore the disabled observer
      Returns:
      this builder
      Since:
      1.0.0
    • refreshTokensEnabled

      Enables server-side refresh-token issuance and rotation; the default is false. False or null disables refresh. Enabling it requires a configured revocationEndpoint(URI) at build and per-client and current grant-policy refresh permission at operation time. It does not override either permission or extend an existing family's pinned lifetime. With refresh enabled, access lifetime must not exceed refresh idle lifetime, which must not exceed refresh absolute lifetime.
      Parameters:
      value - true to enable refresh; false or null to disable it
      Returns:
      this builder
      Since:
      1.0.0
    • allowInsecureLoopback

      Permits a numeric HTTP loopback issuer and its same-authority server routes for local development. The default is false; false or null restores HTTPS-only issuer routes. The HTTP host must be exactly 127.0.0.1 or [::1], not localhost. This option neither admits client redirects nor enables the other loopback options, and it does not weaken CIMD transport or token validation.
      Parameters:
      value - true to allow numeric HTTP loopback issuer routes; false or null to disable
      Returns:
      this builder
      Since:
      1.0.0
    • allowNativeLoopbackRedirects

      Enables HTTP IP-loopback client redirects with the native port exception; the default is false. False or null disables the exception. Literal 127.0.0.1 or [::1] redirects may vary the port while retaining the other checked components; code redemption must use the actual admitted redirect. CIMD uses this explicit policy regardless of its application_type declaration. It does not enable HTTP issuer routes or localhost redirects; see allowInsecureLoopback(Boolean), allowLocalhostRedirects(Boolean) and allowLocalhostAnyPortRedirects(Boolean).
      Parameters:
      value - true to enable the IP-loopback redirect port exception; false or null to disable
      Returns:
      this builder
      Since:
      1.0.0
    • allowLocalhostRedirects

      Enables exact HTTP localhost client redirects; the default is false. False or null disables this profile. Every component, including the configured port spelling, stays exact. This does not enable numeric-loopback redirects, an HTTP issuer, or port-less any-port matching; the latter requires allowLocalhostAnyPortRedirects(Boolean) separately.
      Parameters:
      value - true to enable exact HTTP localhost redirects; false or null to disable
      Returns:
      this builder
      Since:
      1.0.0
    • allowLocalhostAnyPortRedirects

      Enables any-port matching for port-less HTTP localhost client registrations; the default is false. False or null disables it. The registered authority must be exactly localhost; scheme, host, raw path and query stay exact. Fixed-port registrations still require allowLocalhostRedirects(Boolean) and remain exact. No other loopback option is implied. Code redemption requires the actual admitted redirect. A successful build emits OAuthServerObserver.didEnableLocalhostAnyPortRedirects(), and an authorization operation that relies on this exception emits OAuthServerObserver.didUseLocalhostAnyPortRedirects() even if a later check rejects it. Exact matches under the separate exact-localhost profile do not use it.
      Parameters:
      value - true to enable port-less localhost any-port matching; false or null to disable
      Returns:
      this builder
      Since:
      1.0.0
    • acknowledgeUnpatchedRuntime

      Acknowledges the runtime TLS risk when opt-in CIMD requires network access; the default is false. False or null restores refusal on runtimes below 17.0.3 on Java 17 or 18.0.1 on Java 18. The guard is checked at build only when clientMetadataPolicy(OAuthClientMetadataPolicy) enables CIMD; Java 19 and later pass this guard. The flag does not patch TLS or alter signature, claim, address or peer-verification policy. The issuer observer has no acknowledgment event. With CIMD disabled it has no runtime-floor effect on issuer construction.
      Parameters:
      value - true to accept the runtime risk for CIMD; false or null to restore refusal
      Returns:
      this builder
      Since:
      1.0.0
    • authorizationInteractionLifetime

      Sets the maximum lifetime of a browser-bound authorization interaction. Default: 15 minutes; inclusive range: 1 minute through 1 hour. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Authorization-code lifetime must not exceed this lifetime.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • authorizationCodeLifetime

      Sets the lifetime of a one-use authorization code. Default: 2 minutes; inclusive range: 30 seconds through 10 minutes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Must not exceed authorizationInteractionLifetime(Duration); a longer code policy does not revive an expired or consumed code.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • accessTokenLifetime

      Sets the maximum issued access-token lifetime. Default: 5 minutes; inclusive range: 30 seconds through 15 minutes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. With refresh enabled, must not exceed refresh idle lifetime; clock skew must not exceed half this value. Existing families keep their pinned maximum. Raising this value beyond a family pin causes its next refresh to revoke it rather than enlarge the pin.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • refreshTokenIdleLifetime

      Sets the refresh-family idle lifetime used for initial issuance and rotation. Default: 24 hours; inclusive range: 5 minutes through 7 days. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. When refresh is enabled, access lifetime must not exceed this value, which must not exceed refresh absolute lifetime. Existing families retain their original idle-lifetime pin; increasing this setting does not extend it.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • refreshTokenAbsoluteLifetime

      Sets the refresh-family absolute lifetime at initial issuance. Default: 7 days; inclusive range: 1 hour through 30 days. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. With refresh enabled, must be at least refresh idle lifetime. Rotation does not reset the original family absolute expiry, and later configuration does not extend it.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • clockSkew

      Sets issuer JWT-validation skew and its contribution to physical retention. Default: 30 seconds; inclusive range: zero through 60 seconds. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Must not exceed half the access-token lifetime. This does not reserve durable clock time or advance entity floors; authoritative temporal predicates use admitted store time. Together with total deadline and public metadata cache age it contributes to retained grant horizons. A combined policy beyond a stored family horizon causes its next refresh to revoke it; coordinate revocation and new authorization across nodes.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • totalDeadline

      Sets the original monotonic budget for a public issuer operation. Default: 10 seconds; inclusive range: 1 second through 60 seconds. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Preparation, callbacks, contention retries, store work and final admission share this budget; retries do not restart it. Request timeout must not exceed it. Synchronous application callbacks must cooperate because the library cannot forcibly preempt them. It also contributes to the retention margin described by clockSkew(Duration).
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • requestTimeout

      Sets the per-request timeout for outbound CIMD HTTP work. Default: 5 seconds; inclusive range: 1 second through 30 seconds. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Must not exceed totalDeadline(Duration); the original remaining operation budget can shorten a request further. This does not set the host application HTTP-server timeout or preempt arbitrary application callbacks.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • publicMetadataHttpCacheMaxAge

      Sets the HTTP Cache-Control max-age for public issuer metadata and JWKS responses. Default: 60 seconds; inclusive range: zero through 5 minutes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. The header uses whole seconds from Duration.toSeconds(), while the full configured duration governs new-key publication wait and contributes to grant/verification-key retention. A combined policy beyond an existing family horizon causes its next refresh to revoke it; coordinate revocation and new authorization when changing this policy.
      Parameters:
      value - the setting in duration units, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumRequestBodyBytes

      Sets the maximum admitted materialized endpoint request-body size in bytes. Default: 16384 bytes; inclusive range: 1024 bytes through 65536 bytes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. This is a library admission bound, not permission for a transport adapter or host server to allocate an unbounded body before calling the issuer. Query, header, token and result bounds still apply separately.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumRawQueryLength

      Sets the maximum raw query length in UTF-16 code units before form decoding. Default: 16384 code units; inclusive range: 1024 code units through 65536 code units. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Encoded spelling consumes this budget separately from the decoded state/client/scope limits. The host must also bound acquisition of the original query.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumHeaderBytes

      Sets the aggregate request-header and prepared response-header budget in bytes. Default: 16384 bytes; inclusive range: 1024 bytes through 65536 bytes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Admitted request names, values and framing are charged together; separate header-name/occurrence caps and duplicate-security-header rules remain. This does not change the container or adapter read limits.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumResponseBodyBytes

      Sets the maximum prepared issuer response-body size in bytes. Default: 32768 bytes; inclusive range: 4096 bytes through 131072 bytes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Responses are bounded before credential-bearing output or the relevant transition is committed. Request/header/store budgets remain separate; a valid grant need not fit every smaller response policy.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumStoreRecordBytes

      Sets the maximum ASCII sealed store-record size in bytes, not plaintext payload size. Default: 3800 bytes; inclusive range: 1024 bytes through 16384 bytes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Must not exceed the configured stateSealer(StateSealer) maximum sealed length. Envelope, authentication and encoding overhead reduce usable payload capacity. Raising another admission limit does not prove a resulting record fits; this setter neither enlarges the sealer nor migrates existing records.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumStoreCommitAttempts

      Sets the maximum attempts for bounded store-conflict retry loops. Default: 3 attempts; inclusive range: 1 attempt through 8 attempts. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Attempts share the original total deadline; this is not a global cap on every store callback in a composite operation. Only a definite zero-effect conflict permits retry. Unknown mutation outcomes and confirmed commitments requiring reconciliation stop automatic retry.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumResources

      Sets the maximum resource entries accepted by configured issuer resource maps and client admission. Default: 64 resources; inclusive range: 1 resource through 1024 resources. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. The configured server map is checked at build; client maps are checked when selected. It is a count bound, not a collection of wildcard audiences or permission to fetch resource identifiers.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumRedirectUris

      Sets the maximum redirect registrations accepted from a selected client. Default: 32 redirects; inclusive range: 1 redirect through 64 redirects. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Selection applies this bound without changing exact redirect validation or the separately opted-in loopback profiles. Build does not fetch clients to pre-validate their registrations.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumScopesPerResource

      Sets the maximum scope count per resource in issuer configuration and client admission. Default: 32 scopes; inclusive range: 1 scope through 128 scopes. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. The server resource map is checked at build and selected clients at admission. This does not grant a scope absent from the client/server intersection or current grant policy.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumScopeLength

      Sets the maximum length of each ASCII scope token. Default: 128 characters; inclusive range: 1 character through 128 characters. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. The scope grammar remains strict; changing a length bound does not admit whitespace, quotes or backslashes or widen granted scopes.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumStateLength

      Sets the maximum decoded authorization state length in UTF-16 code units. Default: 1024 code units; inclusive range: 128 code units through 4096 code units. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Raw query/body and encoded redirect/response budgets still apply separately. State is reflected only after the request and registered redirect are admitted; it is not application session or CSRF authentication.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumClientIdLength

      Sets the maximum client-identifier length in UTF-16 code units at issuer ingress. Default: 2048 code units; inclusive range: 256 code units through 4096 code units. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. Exact registered and CIMD identifiers remain subject to their profile and aggregate request limits. This bound does not normalize client identifiers or authorize metadata fetching.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • maximumSubjectLength

      Sets the maximum application subject length in UTF-16 code units. Default: 255 code units; inclusive range: 16 code units through 1024 code units. Null restores the default. Bounds and combined constraints are checked by build(), not by this setter. The interval bounds this maximum setting, not a minimum accepted subject length. Subjects remain exact application identifiers, separately scoped by issuer; this does not create accounts or authorize a user.
      Parameters:
      value - the setting in the units described above, or null to restore the default
      Returns:
      this builder
      Since:
      1.0.0
    • configurationDiagnostics

      Inspects the current configuration shape without invoking application collaborators. The immutable result contains only fixed codes and no configured values or exception text. An empty result establishes construction validity, not deployment or key-provider readiness.
      Returns:
      every detectable missing or incompatible setting in deterministic order
      Since:
      1.0.0
    • build

      @CheckReturnValue public @NonNull OAuthAuthorizationServer build()
      Validates the complete configuration and returns an issuer retaining the selected application collaborators. Missing required values, refresh without revocation, unsafe/duplicate/cross-authority routes, invalid numeric/combined limits and a CIMD runtime below the unacknowledged floor fail construction. No client/store/key/policy/resolver callback, clock sampling, network I/O, signing or owned thread is started. Enabling localhost any-port redirects does synchronously notify the configured observer as described by observer(OAuthServerObserver); its documented failure rules apply. This does not initialize an issuer namespace, verify deployment recovery/witness readiness or authorize credential release. Later builder changes do not alter this server; retained application collaborators continue to follow their own lifecycle contracts.
      Returns:
      the configured server, without persistence initialization or serving admission
      Throws:
      IllegalStateException - if required configuration is missing, refresh lacks revocation, or CIMD requires an unacknowledged runtime floor
      IllegalArgumentException - if endpoint, resource, numeric or combined configuration is invalid
      Since:
      1.0.0
    • toString

      Returns a fixed redacted description.
      Overrides:
      toString in class Object
      Returns:
      description
      Since:
      1.0.0