EadHandler

interface EadHandler(source)

Produces and consumes External Authorization Data for a security application (RFC 9528 §3.8, Appendix E). Both methods have defaults, so a handler overrides only what it uses.

Received items arrive before the message that carries them is verified, as RFC 9528 §5.3.3 and §5.4.3 order it: treat them as unauthenticated until the processing call returns. Padding never reaches the handler. Throw an EdhocException to abort the session with a specific error.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend fun consume(message: EdhocMessage, item: EadItem): Boolean

Processes one received item and returns whether it was recognized and processed. An unprocessed critical item aborts the session (RFC 9528 §3.8); an unprocessed non-critical one is ignored.

Link copied to clipboard
open suspend fun produce(message: EdhocMessage): List<EadItem>

The items to send in EAD_x of message; empty for none.