UnprotectedRequest

A verified request, and the way to protect the answers to it.

Properties

Link copied to clipboard

A response the security layer requires instead of processing the request, such as OSCORE's freshness challenge after a reboot (RFC 8613 Appendix B.1.2: a protected 4.01 with Echo). When it is set, the stack does not pass the request to a resource; it sends protectResponse of this message, with the type and Message ID it would give any response.

Link copied to clipboard

Who sent it, for authorization (kcoap-coap's AccessPolicy). Requests of one security context should give equal identities: the server keys block-wise state and Observe registrations by it.

Link copied to clipboard
abstract val message: CoapMessage

The inner request, as the resource sees it.

Functions

Link copied to clipboard
abstract suspend fun protectResponse(response: CoapMessage): CoapMessage

Protects a response to this request. The stack keeps this object for an observation and calls it for every notification, and for a Q-Block body (QBlockServerConfig.withMessageSecurity) for every block, 2.31 and 4.08 it sends in answer to the request (RFC 9177 §4.3, §4.4), from the coroutine of each, so calls may overlap (see ClientMessageSecurity).