[pycsw-devel] Custom CSW-class implementation

Igor Chernikov igorchernikov23 at gmail.com
Mon Jun 20 23:05:59 PDT 2016


Hi. In our application we have the concept of public/private resources -
all public resources are available to the outside world, while private
resources are for authenticated users only. All resources are published
using pycsw for now and application uses GetRecords-requests for searching,
but we need to hide private resources from unauthorized users. My goal is
to provide custom authentication logic for GetRecords and GetRecordById
requests.
My idea is to create subclass of pycsw.ogc.csw.csw2.Csw2 class and override
it's corresponding methods. Something like this:

class MyCsw(Csw2):
    def getrecords(self):
        some_authentication_logic()
        ...

But in the docs I have not found ways to use custom class as
CSW-implementation. Are there ways to solve my problem, or is my idea
obviously bad?

Thanks for your great work!


Igor Chernikov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pycsw-devel/attachments/20160621/2d625da9/attachment.html>


More information about the pycsw-devel mailing list