Giter Club home page Giter Club logo

Comments (5)

sumankhk avatar sumankhk commented on June 19, 2024

it is urgent guys..can anybody help?
@lmignon @sbidoul

from alfodoo.

sumankhk avatar sumankhk commented on June 19, 2024

its been 3 days already ...and i've not got any help? i would really appreciate if anybody could help...
@lmignon @sbidoul @zakiuu @Cedric-Pigeon @max3903

from alfodoo.

sumankhk avatar sumankhk commented on June 19, 2024

@lmignon

from alfodoo.

lmignon avatar lmignon commented on June 19, 2024

@sumankhk Which version of Alfresco do you use? In some cases, a bug in alfresco prevents the generation of a RFC compliant 'www-authenticate' header (https://issues.alfresco.com/jira/browse/MNT-15819)
In such a case, a workaround is to patch httplib2 BEFORE the first import of the lib with the followingg code:

import wrapt
@wrapt.patch_function_wrapper('httplib2', '_parse_www_authenticate')
def wrapper(wrapped, instance, args, kwargs):
    headers = kwargs.get('headers') or args[0]
    headername = kwargs.get('headername') or  args[1]
    if headername == 'www-authenticate' and headers.has_key(headername):
        authenticate = headers[headername].strip()
        if len(authenticate.split(" ")) < 2:
            # A BUG into alfresco generates non RFC compliant
            # 'www-authenticate' header
            # https://issues.alfresco.com/jira/browse/MNT-15819
            # work around this bug and but force Basic auth into the supported
            # authentication
            authenticate = authenticate + ' , Basic realm=""'
            headers[headername] = authenticate
            return wrapped(headers, headername)
    return wrapped(*args, **kwargs)

For one of our client, I've put this code as first lines of in cmislib/__init__py

This relies on the 'wrapt' python package.

see acsone/chemistry-cmislib@2fe8d3f

from alfodoo.

lmignon avatar lmignon commented on June 19, 2024

@sumankhk I close this issue. Feel free to reopen-it if it's not fixed.

from alfodoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.