'Verify.'

@classmethod
def verify(cls, args):

    if args.compact:
        sig = JWS.from_compact(sys.stdin.read().encode())
    else:
        try:
            sig = JWS.json_loads(sys.stdin.read())
        except errors.Error as error:
            six.print_(error)
            return (-1)
    if (args.key is not None):
        assert (args.kty is not None)
        key = args.kty.load(args.key.read()).public_key()
        args.key.close()
    else:
        key = None
    sys.stdout.write(sig.payload)
    return (not sig.verify(key=key))
