How to use the authlib.common.encoding.int_to_base64 function in Authlib

To help you get started, we’ve selected a few Authlib 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 lepture / authlib / authlib / jose / rfc7518 / _backends / _jwk_cryptography.py View on Github external
def dumps_private_key(self, key):
        numbers = key.private_numbers()
        return {
            'kty': 'RSA',
            'n': int_to_base64(numbers.public_numbers.n),
            'e': int_to_base64(numbers.public_numbers.e),
            'd': int_to_base64(numbers.d),
            'p': int_to_base64(numbers.p),
            'q': int_to_base64(numbers.q),
            'dp': int_to_base64(numbers.dmp1),
            'dq': int_to_base64(numbers.dmq1),
            'qi': int_to_base64(numbers.iqmp)
        }
github lepture / authlib / authlib / jose / rfc7518 / _backends / _jwk_cryptography.py View on Github external
def dumps_private_key(self, key):
        numbers = key.private_numbers()
        return {
            'kty': 'RSA',
            'n': int_to_base64(numbers.public_numbers.n),
            'e': int_to_base64(numbers.public_numbers.e),
            'd': int_to_base64(numbers.d),
            'p': int_to_base64(numbers.p),
            'q': int_to_base64(numbers.q),
            'dp': int_to_base64(numbers.dmp1),
            'dq': int_to_base64(numbers.dmq1),
            'qi': int_to_base64(numbers.iqmp)
        }
github lepture / authlib / authlib / jose / rfc7518 / _backends / _jwk_cryptography.py View on Github external
def dumps_private_key(self, key):
        numbers = key.private_numbers()
        return {
            'kty': 'EC',
            'crv': self.CURVES_DSS[key.curve.name],
            'x': int_to_base64(numbers.public_numbers.x),
            'y': int_to_base64(numbers.public_numbers.y),
            'd': int_to_base64(numbers.private_value),
        }
github lepture / authlib / authlib / jose / rfc7518 / _backends / _jwk_cryptography.py View on Github external
def dumps_private_key(self, key):
        numbers = key.private_numbers()
        return {
            'kty': 'RSA',
            'n': int_to_base64(numbers.public_numbers.n),
            'e': int_to_base64(numbers.public_numbers.e),
            'd': int_to_base64(numbers.d),
            'p': int_to_base64(numbers.p),
            'q': int_to_base64(numbers.q),
            'dp': int_to_base64(numbers.dmp1),
            'dq': int_to_base64(numbers.dmq1),
            'qi': int_to_base64(numbers.iqmp)
        }
github lepture / authlib / authlib / jose / rfc7518 / _backends / _jwk_cryptography.py View on Github external
def dumps_private_key(self, key):
        numbers = key.private_numbers()
        return {
            'kty': 'RSA',
            'n': int_to_base64(numbers.public_numbers.n),
            'e': int_to_base64(numbers.public_numbers.e),
            'd': int_to_base64(numbers.d),
            'p': int_to_base64(numbers.p),
            'q': int_to_base64(numbers.q),
            'dp': int_to_base64(numbers.dmp1),
            'dq': int_to_base64(numbers.dmq1),
            'qi': int_to_base64(numbers.iqmp)
        }
github lepture / authlib / authlib / jose / rfc7518 / _backends / _jwk_cryptography.py View on Github external
def dumps_private_key(self, key):
        numbers = key.private_numbers()
        return {
            'kty': 'RSA',
            'n': int_to_base64(numbers.public_numbers.n),
            'e': int_to_base64(numbers.public_numbers.e),
            'd': int_to_base64(numbers.d),
            'p': int_to_base64(numbers.p),
            'q': int_to_base64(numbers.q),
            'dp': int_to_base64(numbers.dmp1),
            'dq': int_to_base64(numbers.dmq1),
            'qi': int_to_base64(numbers.iqmp)
        }
github lepture / authlib / authlib / jose / rfc7518 / _backends / _jwk_cryptography.py View on Github external
def dumps_public_key(self, key):
        numbers = key.public_numbers()
        return {
            'kty': 'RSA',
            'n': int_to_base64(numbers.n),
            'e': int_to_base64(numbers.e)
        }