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

exception aries_cloudagent.messaging.jsonld.create_verify_data.DroppedAttributeException[source]

Bases: Exception

Exception used to track that an attribute was removed.

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

Encapsulate the process of constructing the 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.

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

Sign JWS.

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

Detatched jws verify handling.

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

Sign Credential.

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

Verify credential.

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

Check header requirements.

aries_cloudagent.messaging.jsonld.routes module

jsonld admin routes.

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

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Request schema for signing a jsonld doc.

doc = <fields.Dict(default=<marshmallow.missing>, attribute=None, validate=None, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid mapping type.'})>
verkey = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.messaging.jsonld.routes.SignResponseSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Response schema for a signed jsonld doc.

signed_doc = <fields.Dict(default=<marshmallow.missing>, attribute=None, validate=None, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid mapping type.'})>
class aries_cloudagent.messaging.jsonld.routes.VerifyRequestSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Request schema for signing a jsonld doc.

doc = <fields.Dict(default=<marshmallow.missing>, attribute=None, validate=None, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid mapping type.'})>
verkey = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.messaging.jsonld.routes.VerifyResponseSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Response schema for verification result.

valid = <fields.Boolean(default=<marshmallow.missing>, attribute=None, validate=None, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>
aries_cloudagent.messaging.jsonld.routes.register(app: <sphinx.ext.autodoc.importer._MockObject object at 0x7f760ddd9c50>)[source]

Register routes.

aries_cloudagent.messaging.jsonld.routes.sign(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7f760ddd9c50>)[source]

Request handler for signing a jsonld doc.

Parameters:request – aiohttp request object
aries_cloudagent.messaging.jsonld.routes.verify(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7f760ddd9c50>)[source]

Request handler for signing a jsonld doc.

Parameters:request – aiohttp request object