mwoauth.errors.OAuthException in Flask

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

mwoauth.errors.OAuthException in Flask

Egbe Eugene
Hello All,

i am not sure this is the right channel to send this. Nevertheless, I am
trying to login using OAuth from a flask application and I am getting an
error which says

*MediaWiki response lacks token information: {b'Consumer is owner-only, <a
class': [b'"external"
href="https://www.mediawiki.org/wiki/Help:OAuth/Errors#E010
<https://www.mediawiki.org/wiki/Help:OAuth/Errors#E010>">E010</a>']}*

I am not sure why i got no response token. Please i need some help on this.

Thanks.
<Eugene233>
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: mwoauth.errors.OAuthException in Flask

David Barratt
With owner-only consumers, you cannot use the grant process:
https://www.mediawiki.org/wiki/OAuth/Owner-only_consumers you can use the
resource directly. When you request an owner-only token, you should get an
access token at that point. Unfortunately (afaik) there is no way to test
the workflow without a getting a real consumer.

On Tue, Apr 9, 2019 at 6:00 AM Egbe Eugene <[hidden email]> wrote:

> Hello All,
>
> i am not sure this is the right channel to send this. Nevertheless, I am
> trying to login using OAuth from a flask application and I am getting an
> error which says
>
> *MediaWiki response lacks token information: {b'Consumer is owner-only, <a
> class': [b'"external"
> href="https://www.mediawiki.org/wiki/Help:OAuth/Errors#E010
> <https://www.mediawiki.org/wiki/Help:OAuth/Errors#E010>">E010</a>']}*
>
> I am not sure why i got no response token. Please i need some help on this.
>
> Thanks.
> <Eugene233>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: mwoauth.errors.OAuthException in Flask

Brad Jorsch (Anomie)
In reply to this post by Egbe Eugene
On Tue, Apr 9, 2019 at 6:00 AM Egbe Eugene <[hidden email]> wrote:

> *MediaWiki response lacks token information: {b'Consumer is owner-only, <a
> class': [b'"external"
> href="https://www.mediawiki.org/wiki/Help:OAuth/Errors#E010
> <https://www.mediawiki.org/wiki/Help:OAuth/Errors#E010>">E010</a>']}*
>
> I am not sure why i got no response token.


You got no response token because you got an error response instead. As
stated at the link in the error message, owner-only consumers are
pre-authorized so the client should be configured with the token key and
secret directly instead of using the authorization endpoints.

I don't know how to do that using Flask; if you need help with that you'd
probably do better to ask in a forum specific to Flask.

--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: mwoauth.errors.OAuthException in Flask

Brad Jorsch (Anomie)
In reply to this post by David Barratt
On Tue, Apr 9, 2019 at 10:17 AM David Barratt <[hidden email]>
wrote:

> Unfortunately (afaik) there is no way to test the workflow without a
> getting a real consumer.
>

That shouldn't be too much of a problem, since the owner can use the
consumer for testing while it's still in the "proposed" state.


--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l