def sign(self, request, consumer, token):
        key, raw = self.signing_base(request, consumer, token)

        # HMAC object.
        try:
            from hashlib import sha1 as sha
        except ImportError:
            import sha # Deprecated

        hashed = hmac.new(key, raw, sha)

        # Calculate the digest base 64.
        return binascii.b2a_base64(hashed.digest())[:-1]
Builds the base signature string.
dataset/ETHPy150Open mrgaaron/LinkedIn-Client-Library/liclient/oauth2/__init__.py/SignatureMethod_HMAC_SHA1.sign