Skip to content

[Failed assertion: boolean expression must not be null] when trying to get the payload of a ECSigned token #5

Closed
@AlecsFerra

Description

@AlecsFerra

Got this error while trying to get the payload of the JWE Token

  final jwe = JsonWebEncryption.fromCompactSerialization(jwes);

  final jwk = JsonWebKey.fromJson(jwks);

  final jwkStore = JsonWebKeyStore()..addKey(jwk);

  return await jwe.getPayload(jwkStore);

It works with the example in the docs but when I use my own keys with different algorithms it fails.

EX

final jwks = {
      "kty": "EC",
      "d": "XXXXXXX",
      "crv": "P-256",
      "x": "XXXXXXXXX",
      "y": "XXXXXXXXXX"
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions