Module leec_jws

This module manages JSON Web Signatures (JWS).

Description

This module manages JSON Web Signatures (JWS).

See https://en.wikipedia.org/wiki/JSON_Web_Signature.

Data Types

content()

content() = maybe(payload())

jws()

jws() = leec:jws()

leec_http_state()

leec_http_state() = leec:leec_http_state()

maybe()

maybe(T) = basic_utils:maybe(T)

payload()

payload() = table(atom(), term())

Known keys: - termsOfServiceAgreed :: boolean() - contact :: ustring()

table()

table(K, V) = map_hashtable:map_hashtable(K, V)

tls_private_key()

tls_private_key() = leec:tls_private_key()

tls_public_key()

tls_public_key() = leec:tls_public_key()

void()

void() = basic_utils:void()

Function Index

encode/4Builds and returns the JWS body.
get_key_authorization/3Builds and returns the ACME key authorization.
init/1Initializes a RSA JWS with specified TLS private key.

Function Details

encode/4

encode(PrivateKey::tls_private_key(), Jws::jws(), Content::content(), Leec_http_state::leec_http_state()) -> leec:binary_b64()

Builds and returns the JWS body.

See https://www.rfc-editor.org/rfc/rfc8555.html#section-6.2.

Content is the payload (if any).

get_key_authorization/3

get_key_authorization(Tls_public_key::tls_public_key(), Token::leec:token(), Leec_http_state::leec_http_state()) -> leec:key_auth()

Builds and returns the ACME key authorization.

See https://www.rfc-editor.org/rfc/rfc8555.html#section-8.1.

init/1

init(Tls_private_key::tls_private_key()) -> jws()

Initializes a RSA JWS with specified TLS private key.


Generated by EDoc