Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
refactor: refine the Handler validation
Browse files Browse the repository at this point in the history
- instead of valid_input call handler methods w/ the resulting dict as
args/kwargs (similarly to how cyclone does)
- bundle router info together in registration to ease passing it around
- kill the now unneeded MessageSchema args/kwargs shuffle and its
associated test_delete_topic_success2
- fix LogCheckSchema typo

closes #695
  • Loading branch information
pjenvey committed Apr 13, 2017
1 parent ee54f88 commit 22ba202
Show file tree
Hide file tree
Showing 12 changed files with 296 additions and 276 deletions.
7 changes: 5 additions & 2 deletions autopush/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from cryptography.hazmat.primitives import hashes
from pyasn1.error import PyAsn1Error
from twisted.logger import Logger
from typing import Tuple # noqa

from autopush.types import JSONDict # noqa


def repad(string):
Expand All @@ -34,7 +37,7 @@ class VerifyJWT(object):

@staticmethod
def extract_signature(auth):
# type: (str) -> tuple()
# type: (str) -> Tuple[str, str]
"""Fix the JWT auth token.
The JWA spec defines the signature to be a pair of 32octet encoded
Expand Down Expand Up @@ -62,7 +65,7 @@ def extract_signature(auth):

@staticmethod
def decode(token, key):
# type (str, str) -> dict()
# type (str, str) -> JSONDict
"""Decode a web token into a assertion dictionary.
This attempts to rectify both ecdsa and openssl generated
Expand Down
Loading

0 comments on commit 22ba202

Please sign in to comment.