aries_cloudagent.messaging.jsonld package

Submodules

aries_cloudagent.messaging.jsonld.create_verify_data module

Contains the functions needed to produce and verify a json-ld signature.

This file was ported from https://github.com/transmute-industries/Ed25519Signature2018/blob/master/src/createVerifyData/index.js

aries_cloudagent.messaging.jsonld.create_verify_data.create_verify_data(data, signature_options, document_loader=None)[source]

Encapsulate process of constructing string used during sign and verify.

aries_cloudagent.messaging.jsonld.credential module

Sign and verify functions for json-ld based credentials.

aries_cloudagent.messaging.jsonld.credential.b64decode(bytes)[source]

Url Safe B64 Decode.

aries_cloudagent.messaging.jsonld.credential.b64encode(str)[source]

Url Safe B64 Encode.

aries_cloudagent.messaging.jsonld.credential.create_jws(encoded_header, verify_data)[source]

Compose JWS.

aries_cloudagent.messaging.jsonld.credential.did_key(verkey: str) str[source]

Qualify verkey into DID key if need be.

async aries_cloudagent.messaging.jsonld.credential.jws_sign(session, verify_data, verkey)[source]

Sign JWS.

async aries_cloudagent.messaging.jsonld.credential.jws_verify(session, verify_data, signature, public_key)[source]

Detatched jws verify handling.

async aries_cloudagent.messaging.jsonld.credential.sign_credential(session, credential, signature_options, verkey)[source]

Sign Credential.

async aries_cloudagent.messaging.jsonld.credential.verify_credential(session, doc, verkey)[source]

Verify credential.

aries_cloudagent.messaging.jsonld.credential.verify_jws_header(header)[source]

Check header requirements.

aries_cloudagent.messaging.jsonld.error module

JSON-LD messaging Exceptions.

exception aries_cloudagent.messaging.jsonld.error.BadJWSHeaderError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseJSONLDMessagingError

Exception indicating invalid JWS header.

exception aries_cloudagent.messaging.jsonld.error.BaseJSONLDMessagingError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseError

Base exception class for JSON-LD messaging.

exception aries_cloudagent.messaging.jsonld.error.DroppedAttributeError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseJSONLDMessagingError

Exception used to track that an attribute was removed.

exception aries_cloudagent.messaging.jsonld.error.InvalidVerificationMethod(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseJSONLDMessagingError

Exception indicating an invalid verification method in doc to verify.

exception aries_cloudagent.messaging.jsonld.error.MissingVerificationMethodError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseJSONLDMessagingError

Exception indicating missing verification method from signature options.

exception aries_cloudagent.messaging.jsonld.error.SignatureTypeError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseJSONLDMessagingError

Exception indicating Signature type error.

aries_cloudagent.messaging.jsonld.routes module

jsonld admin routes.

class aries_cloudagent.messaging.jsonld.routes.DocSchema(*args: Any, **kwargs: Any)[source]

Bases: OpenAPISchema

Schema for LD doc to sign.

options

alias of SignatureOptionsSchema

class aries_cloudagent.messaging.jsonld.routes.SignRequestSchema(*args: Any, **kwargs: Any)[source]

Bases: OpenAPISchema

Request schema for signing a jsonld doc.

doc

alias of DocSchema

class aries_cloudagent.messaging.jsonld.routes.SignResponseSchema(*args: Any, **kwargs: Any)[source]

Bases: OpenAPISchema

Response schema for a signed jsonld doc.

class aries_cloudagent.messaging.jsonld.routes.SignatureOptionsSchema(*args: Any, **kwargs: Any)[source]

Bases: Schema

Schema for LD signature options.

class aries_cloudagent.messaging.jsonld.routes.SignedDocSchema(*args: Any, **kwargs: Any)[source]

Bases: OpenAPISchema

Verifiable doc schema.

class Meta[source]

Bases: object

Keep unknown values.

proof

alias of SignatureOptionsSchema

class aries_cloudagent.messaging.jsonld.routes.VerifyRequestSchema(*args: Any, **kwargs: Any)[source]

Bases: OpenAPISchema

Request schema for signing a jsonld doc.

doc

alias of SignedDocSchema

class aries_cloudagent.messaging.jsonld.routes.VerifyResponseSchema(*args: Any, **kwargs: Any)[source]

Bases: OpenAPISchema

Response schema for verification result.

aries_cloudagent.messaging.jsonld.routes.post_process_routes(app: aiohttp.web.Application)[source]

Amend swagger API.

async aries_cloudagent.messaging.jsonld.routes.register(app: aiohttp.web.Application)[source]

Register routes.