adk_live_credential_broker (erlang_adk v0.7.0)

View Source

Opaque, process-scoped storage for reconnectable Live credentials.

The secret is kept in a private ETS table rather than in the broker or session state returned by OTP system inspection. The returned reference is a capability: only code which already possesses it can resolve the secret. The table is destroyed when the session owner exits or explicitly revokes the reference.

Summary

Types

credential_ref/0

-opaque credential_ref()

Functions

code_change(OldVsn, State, Extra)

format_status(Status)

handle_call(Request, From, State)

handle_cast(Message, State)

handle_info(Message, State)

init(_)

resolve(Reference)

-spec resolve(credential_ref()) -> {ok, binary()} | {error, credential_unavailable}.

revoke(Reference)

-spec revoke(credential_ref()) -> ok.

start(Owner, Secret)

-spec start(pid(), binary()) -> {ok, credential_ref()} | {error, invalid_credential}.

terminate(Reason, _)

valid_ref(Reference)

-spec valid_ref(term()) -> boolean().