How to use the mkmsdk.MKMOAuth1.MKMOAuth1.decode_signature function in mkmsdk

To help you get started, we’ve selected a few mkmsdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github evonove / mkm-sdk / tests / tests_unit / test_oauth.py View on Github external
def test_header_signature_is_correctly_decoded():
    """
    Verifies oauth_signature is decoded correctly.
    This is done so the backend accepts the Authorization header.
    """
    given_header = {"Authorization": b'oauth_signature="test%20signature"'}
    expected_signature = 'oauth_signature="test signature"'

    decoded_signature = MKMOAuth1.decode_signature(given_header)

    assert decoded_signature == expected_signature