rename Micropub to MicropubClient to differentiate
This commit is contained in:
parent
6db7529f4a
commit
1da9d95fc6
|
@ -1,10 +1,10 @@
|
|||
from flask import Flask, request, url_for
|
||||
from flask.ext.micropub import Micropub
|
||||
from flask.ext.micropub import MicropubClient
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config['SECRET_KEY'] = 'my super secret key'
|
||||
micropub = Micropub(app)
|
||||
micropub = MicropubClient(app)
|
||||
|
||||
|
||||
@app.route('/micropub-callback')
|
||||
|
|
|
@ -21,7 +21,7 @@ else:
|
|||
from urllib.parse import urlencode, parse_qs
|
||||
|
||||
|
||||
class Micropub:
|
||||
class MicropubClient:
|
||||
"""Flask-Micropub provides support for IndieAuth/Micropub
|
||||
authentication and authorization.
|
||||
|
||||
|
@ -139,7 +139,8 @@ class Micropub:
|
|||
return AuthResponse(
|
||||
next_url=next_url,
|
||||
error='authorization failed. {}: {}'.format(
|
||||
rdata.get('error'), rdata.get('error_description')))
|
||||
next(rdata.get('error', []), None),
|
||||
next(rdata.get('error_description', []), None)))
|
||||
|
||||
if 'me' not in rdata:
|
||||
return AuthResponse(
|
||||
|
|
Loading…
Reference in New Issue