Skip to content

I think merging pyjwt 2 broke things #122

@athornton

Description

@athornton
  File "./giftless/view.py", line 72, in post
    response['objects'] = [action(**o) for o in payload['objects']]
  File "./giftless/view.py", line 72, in <listcomp>
    response['objects'] = [action(**o) for o in payload['objects']]
  File "./giftless/transfer/basic_external.py", line 42, in upload
    lifetime=self.VERIFY_LIFETIME)
  File "./giftless/transfer/__init__.py", line 69, in _preauth_headers
    return self._auth_module.preauth_handler.get_authz_header(identity, org, repo, actions, oid, lifetime=lifetime)
  File "./giftless/auth/jwt.py", line 127, in get_authz_header
    token = self._generate_token_for_action(*args, **kwargs)
  File "./giftless/auth/jwt.py", line 154, in _generate_token_for_action
    return self._generate_token(**token_payload).decode('ascii')
AttributeError: 'str' object has no attribute 'decode'

I wasn't getting this before. I haven't looked yet, but I see there's a new major version of pyjwt, and I strongly suspect something here changed a type from bytes[] to str. I'll take a look when I have time.

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