src/fedoidcmsg/__init__.py
def verify(self, **kwargs):
        """
        Verifies that an instance of this class adheres to the given
        restrictions.

        :param kwargs: A set of keyword arguments
        :return: True if it verifies OK otherwise False.
        """
        super(MetadataStatement, self).verify(**kwargs)
        if "signing_keys" in self:
            if 'signing_keys_uri' in self:
                raise VerificationError(
                    'You can only have one of "signing_keys" and '
                    '"signing_keys_uri" in a metadata statement')
            else:
                # signing_keys MUST be a JWKS
                kj = KeyJar()
                try:
                    kj.import_jwks(self['signing_keys'], '')
                except Exception:
                    raise VerificationError('"signing_keys" not a proper JWKS')

        if "metadata_statements" in self and "metadata_statement_uris" in self:
            s = set(self['metadata_statements'].keys())
            t = set(self['metadata_statement_uris'].keys())
            if s.intersection(t):
                raise VerificationError(
                    'You should not have the same key in "metadata_statements" '
                    'and in "metadata_statement_uris"')

        return True
def verify(self, **kwargs):
        super(MetadataStatement, self).verify(**kwargs)
        if "signing_keys" in self:
            if 'signing_keys_uri' in self:
                raise VerificationError(
                    'You can only have one of "signing_keys" and '
                    '"signing_keys_uri" in a metadata statement')
            else:
                # signing_keys MUST be a JWKS
                kj = KeyJar()
                try:
                    kj.import_jwks(self['signing_keys'], '')
                except Exception:
                    raise VerificationError('"signing_keys" not a proper JWKS')

        if "metadata_statements" in self and "metadata_statement_uris" in self:
            s = set(self['metadata_statements'].keys())
            t = set(self['metadata_statement_uris'].keys())
            if s.intersection(t):
                raise VerificationError(
                    'You should not have the same key in "metadata_statements" '
                    'and in "metadata_statement_uris"')

        return True
def verify ( self , * * kwargs ) : super ( MetadataStatement , self ) . verify ( * * kwargs ) if "signing_keys" in self : if 'signing_keys_uri' in self : raise VerificationError ( 'You can only have one of "signing_keys" and ' '"signing_keys_uri" in a metadata statement' ) else : # signing_keys MUST be a JWKS kj = KeyJar ( ) try : kj . import_jwks ( self [ 'signing_keys' ] , '' ) except Exception : raise VerificationError ( '"signing_keys" not a proper JWKS' ) if "metadata_statements" in self and "metadata_statement_uris" in self : s = set ( self [ 'metadata_statements' ] . keys ( ) ) t = set ( self [ 'metadata_statement_uris' ] . keys ( ) ) if s . intersection ( t ) : raise VerificationError ( 'You should not have the same key in "metadata_statements" ' 'and in "metadata_statement_uris"' ) return True
Verifies that an instance of this class adheres to the given
        restrictions.

        :param kwargs: A set of keyword arguments
        :return: True if it verifies OK otherwise False.
Verifies that an instance of this class adheres to the given restrictions .