AbtDid v0.3.1 AbtDid.Signer View Source

Signs messages with the DID and verifies signatures.

Link to this section Summary

Functions

Generates an ABT DID auth token with extra information and signs it, returns the data in JWT format. The extra can also be used to override the default values

Verifies if the token is signed by the secret key of the pk and also verifies if the DID contained in the iss field of the token matches the pk

Link to this section Functions

Link to this function

gen_and_sign(did_type, sk, extra \\ %{}) View Source
gen_and_sign(AbtDid.Type.t() | String.t(), binary(), map()) :: String.t()

Generates an ABT DID auth token with extra information and signs it, returns the data in JWT format. The extra can also be used to override the default values.

Link to this function

verify(token, pk) View Source
verify(String.t(), binary()) :: boolean()

Verifies if the token is signed by the secret key of the pk and also verifies if the DID contained in the iss field of the token matches the pk.