<div dir="ltr">Hi Julian, we need to implement an OAuth2 server inside Koha, using Mojolicious::Plugin::OAuth2::Server [1]. I've worked on an endpoint for authenticating the API against a generic OAuth2 server (as a way to be able to test it :-D). I will file a bug very soon for that. My idea was then to implement the server...<div><br></div><div>OAuth2 proposes several authorization flows, and the plugin (actually the server library) implements all of them. [2]</div><div><br><div>Hope it helps. I haven't managed to have the time to do it!</div><div><br></div><div>[1] <a href="https://metacpan.org/pod/Mojolicious::Plugin::OAuth2::Server">https://metacpan.org/pod/Mojolicious::Plugin::OAuth2::Server</a></div></div><div>[2] <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">https://auth0.com/docs/api-auth/which-oauth-flow-to-use</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">El mar., 27 feb. 2018 a las 12:04, Julian Maurice (<<a href="mailto:julian.maurice@biblibre.com">julian.maurice@biblibre.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
As you may know [1], BibLibre is working on an interface between Koha<br>
and Coral. To achieve that, Coral uses the Koha REST API. But we are<br>
facing a problem that is becoming really blocking : the lack of a proper<br>
authentication system for the REST API.<br>
<br>
At the moment, the only way to authenticate to the API is based on<br>
cookies. It works well for client-side javascript inside Koha, but it's<br>
not really usable by external clients.<br>
<br>
Is there someone here who use this API outside of Koha ?<br>
If so, how do you authenticate to it ?<br>
<br>
I think we really need an authentication mechanism other than cookies,<br>
so people can actually start using the API.<br>
<br>
There is bug 13920 [2] that hasn't moved since 8 months. I remember that<br>
some people disagreed with this patchset because it is crafting a custom<br>
authentication system instead of using some "standard" one (I remember<br>
OAuth was mentioned).<br>
Do you know of any "standard" auth system that we can implement, or<br>
existing Perl libraries we can use ?<br>
<br>
<br>
[1]:<br>
<a href="http://lists.koha-community.org/pipermail/koha-devel/2017-January/043430.html" rel="noreferrer" target="_blank">http://lists.koha-community.org/pipermail/koha-devel/2017-January/043430.html</a><br>
[2]: <a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13920" rel="noreferrer" target="_blank">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13920</a><br>
<br>
--<br>
Julian Maurice <<a href="mailto:julian.maurice@biblibre.com" target="_blank">julian.maurice@biblibre.com</a>><br>
BibLibre<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Tomás Cohen Arazi</div><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Theke Solutions (<a href="http://theke.io/">https://theke.io</a>)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F</div></div></div>