Skip to content

JWT authorization token too long #3

@SamdevQ

Description

@SamdevQ

I've gotten the server and client apps running but when I try to make a request, the JWT token which comes from the local server's /token endpoint is apparently too many characters (which doesn't make sense as it's a valid JWT token from what I can tell and just as many characters as it needs to be).

Specifically, I get an HTTP 400 error with this response:

{"code":"400","description":"prepareTransactionRequest.authorization: size must be between 0 and 1024, prepareTransactionRequest.authorization: must match \"^Bearer [A-Za-z0-9\\-_. ]{1,1024}$\"","category":"Constraint Violations"}

My request (managed by the client app) contains the Authorization header as I would expect.

authorization: Bearer eyJ...[token redacted]

The URL this is hitting is https://api.sandbox.overledger.io/v2/preparation/transaction. Is that perhaps wrong? Should I not be hitting overledger.io and instead pointing to something local?

The token and the "Bearer " prefix are in fact 1061 characters (37 over the apparent 1024 limit), but that's not avoidable if the token is to be used in its entirety.

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