

@app.route('/micropub', methods=['GET', 'POST', 'PATCH', 'PUT', 'DELETE'])
def handleMicroPub():
    app.logger.info(('handleMicroPub [%s]' % request.method))
    access_token = request.headers.get('Authorization')
    if access_token:
        access_token = access_token.replace('Bearer ', '')
    (me, client_id, scope) = checkAccessToken(access_token)
    app.logger.info(('micropub %s [%s] [%s, %s, %s]' % (request.method, domain, me, client_id, scope)))
    if ((me is None) or (client_id is None)):
        return ('Invalid access_token', 400, {
            
        })
    elif (request.method == 'POST'):
        domain = baseDomain(me, includeScheme=False)
        if (domain == cfg.our_domain):
            data = {
                
            }
            for key in ('h', 'name', 'summary', 'content', 'published', 'updated', 'category', 'slug', 'location', 'in-reply-to', 'repost-of', 'syndication', 'syndicate-to'):
                data[key] = request.form.get(key)
            return processMicropub(me, client_id, scope, data)
        else:
            return ('unauthorized', 401)
    elif (request.method == 'GET'):
        return ('not implemented', 501)

dataset/ETHPy150Open bear/python-indieweb/indieweb.py handleMicroPub/VarMisuse@101/166 `access_token`->`domain`