RsaKeyService

@Service
class RsaKeyService(@Value(value = "${security.jwt.rsa.public-key-pem:}") publicPem: String?, @Value(value = "${security.jwt.rsa.private-key-pem:}") privatePem: String?, @Value(value = "${security.jwt.kid:}") configuredKid: String?)

Provides an RSA key pair for signing and verifying access tokens and exposes a stable kid. If no keys are configured, an ephemeral dev key is generated at startup.

Properties (optional):

  • security.jwt.rsa.public-key-pem: Base64 (PEM without headers) public key (X.509 SubjectPublicKeyInfo)

  • security.jwt.rsa.private-key-pem: Base64 (PEM without headers) private key (PKCS#8)

  • security.jwt.kid: Optional static key id; otherwise computed from public key SHA-256.

Constructors

Link copied to clipboard
constructor(@Value(value = "${security.jwt.rsa.public-key-pem:}") publicPem: String?, @Value(value = "${security.jwt.rsa.private-key-pem:}") privatePem: String?, @Value(value = "${security.jwt.kid:}") configuredKid: String?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val kid: String
Link copied to clipboard
Link copied to clipboard