Class SessionCredentials
java.lang.Object
ai.redouble.demo.spring.SessionCredentials
- All Implemented Interfaces:
SessionStore
Credentials a person pastes into the page, held for this process only. They land as a
runtime
MapPropertySource placed ahead of every other source, so the runtime's
Boot-property store (SpringSecrets, reading nucleo.credentials.<id>) sees
them through the same machinery a vault or an environment variable uses - the runtime
neither knows nor cares that the value arrived from a form. Nothing here is ever written
to a file, echoed back over HTTP, or logged beyond the credential's id; stopping the
process is the only place these values live.
A credential the deployment already holds is refused rather than shadowed: the app's clients are constructed once around a credential and shared, so replacing one mid-process would leave live clients on the old value and new ones on the new - a lie on the status page. Session credentials fill gaps, they never override the deployment's. A credential this store itself holds may be corrected - a mistyped endpoint must not need a restart - and the caller evicts the affected providers' cached clients in the same breath.
- Since:
- 0.1 (2026-09-18)
- Author:
- Andrey Santrosyan
-
Constructor Summary
ConstructorsConstructorDescriptionSessionCredentials(org.springframework.core.env.ConfigurableEnvironment environment) -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this store holds any part of the credential - a session credential may be corrected, a deployment's never.voidHolds one credential for the rest of this process: the id is the runtime's record name (anthropic-api-key,aws-region); user, secret and host are its parts, blank parts left unset.
-
Constructor Details
-
SessionCredentials
public SessionCredentials(org.springframework.core.env.ConfigurableEnvironment environment)
-
-
Method Details
-
provide
Holds one credential for the rest of this process: the id is the runtime's record name (anthropic-api-key,aws-region); user, secret and host are its parts, blank parts left unset. Effective from the next lookup - the property source is live.- Specified by:
providein interfaceSessionStore
-
holds
Whether this store holds any part of the credential - a session credential may be corrected, a deployment's never.- Specified by:
holdsin interfaceSessionStore
-