def __init__(self, issuer, issuer_id, private_key, url, testing, transport): """ :param issuer: Issuer type that will be translated directly to the JOSE transport layer as an issuer. IE: svc, dir, org :param issuer_id: UUID of the issuer :param private_key: PEM formatted private key string :param url: URL for the LaunchKey API :param testing: Boolean stating whether testing mode is being used. This will determine whether SSL validation occurs. """ self._issuer_id = UUIDHelper().from_string(issuer_id) self._transport = transport if transport is not None else JOSETransport( ) self._transport.set_url(url, testing) self._transport.set_issuer(issuer, issuer_id, private_key)
def test_valid_uuid_3(self, value): UUIDHelper().from_string(value, 3)
def test_invalid_uuid_1(self, value): with self.assertRaises(InvalidIssuerVersion): UUIDHelper().from_string(value, 1)
def test_valid_uuid_default(self, value): UUIDHelper().from_string(value)
def test_invalid_uuid_validate_version(self, value): with self.assertRaises(InvalidIssuerFormat): UUIDHelper().validate_version(value, None)
def test_invalid_uuid_from_string(self, value): with self.assertRaises(InvalidIssuerFormat): UUIDHelper().from_string(value)