You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Daniel Carlson <da...@gmail.com> on 2016/07/12 04:31:47 UTC

GSOC 2016 - Authentication on the Mifos REST API

Hi all,

For my Google Summer of Code project for this year, I need to get data from
the Mifos platform. To that, according to the REST API documentation, I
have to authenticate that request by by using a basic authentication key
which I then used to make my requests.
I have used this link:
https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default

but I get CORS errors despite my header configurations which I copied from
the community app.
So I setup my local server and used this link:
https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default

Now I get a 500 error code on Firefox and on Chrome I still get a CORS error

Any help with this please?

Cheers!
Daniel Carlson

RE: GSOC 2016 - Authentication on the Mifos REST API

Posted by "Mifos @omexit" <mi...@omexit.com>.
Hi,

 

Can you get error logs of your application when you get error 500? It means internal server error, which may describe why. 

 

From: Daniel Carlson [mailto:dancarl758@gmail.com] 
Sent: Tuesday, July 12, 2016 7:32 AM
To: Nayan Ambali <na...@gmail.com>; Omexit Mifos <mi...@omexit.com>; Ed Cable <ed...@mifos.org>; Markus Geiß <mg...@mifos.org>; dev@fineract.incubator.apache.org
Subject: GSOC 2016 - Authentication on the Mifos REST API

 

Hi all,

 

For my Google Summer of Code project for this year, I need to get data from the Mifos platform. To that, according to the REST API documentation, I have to authenticate that request by by using a basic authentication key which I then used to make my requests.

I have used this link: https://demo.openmf.org/fineract-provider/api/authentication?username=mifos <https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default> &password=password&&tenantIdentifier=default

 

but I get CORS errors despite my header configurations which I copied from the community app.

So I setup my local server and used this link: https://localhost:8443/fineract-provider/api/authentication?username=mifos <https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default> &password=password&&tenantIdentifier=default

 

Now I get a 500 error code on Firefox and on Chrome I still get a CORS error

 

Any help with this please?

 

Cheers!

Daniel Carlson

 


Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Daniel Carlson <da...@gmail.com>.
The main.js file has functions which call it. The function itself is in the
services.js

Cheers!
Daniel Carlson

On Tue, Jul 12, 2016 at 11:27 AM, Shreyaank Byadagi <
shreyaank@confluxtechnologies.com> wrote:

> Hi daniel,
> Which controller is calling the authentication service?
>
> Regards
> Shreyaank
>
> On Tue, Jul 12, 2016 at 3:34 PM, Daniel Carlson <da...@gmail.com>
> wrote:
>
> > Hi Shreyank,
> >
> > This is the github link:
> >
> https://github.com/DanCarl857/Mobile-Application/tree/master/frontend-app
> >
> > Thanks
> >
> > Cheers!
> > Daniel Carlson
> >
> > On Tue, Jul 12, 2016 at 10:07 AM, Shreyaank Byadagi <
> > shreyaank@confluxtechnologies.com> wrote:
> >
> > > Hi Daniel,
> > > Please share your code I will look into your code base and try to fix
> it
> > >
> > > Regards
> > > Shreyaank
> > >
> > > On Tue, Jul 12, 2016 at 1:01 PM, Daniel Carlson <da...@gmail.com>
> > > wrote:
> > >
> > > > Hi Shreyaank,
> > > >
> > > > But when I use that from within my code. Like for example when the
> user
> > > > logs in, they enter their username and password(in this case mifos
> and
> > > > password), I want to use this to log them onto the mifos platform so
> I
> > > use
> > > > that call from within my code. But I am getting CORS errors. I had to
> > > > download and add a plugin in Chrome which enables that. Could you
> tell
> > > how
> > > > to fix this so that it works on all browsers? This is because clients
> > > with
> > > > Chrome may not have this plugin.
> > > >
> > > > Cheers!
> > > > Daniel Carlson
> > > >
> > > > On Tue, Jul 12, 2016 at 8:07 AM, Daniel Carlson <
> dancarl758@gmail.com>
> > > > wrote:
> > > >
> > > > > Hi Nikhil, Terence,
> > > > >
> > > > > I wanted to do this from within the code as it is part of the login
> > > > > service for my app.
> > > > >
> > > > > Terence that solved it thanks. Many heads are indeed better than
> one.
> > > > >
> > > > > Cheers!
> > > > > Daniel Carlson
> > > > >
> > > > >
> > > > > On Tue, Jul 12, 2016 at 7:51 AM, Nikhil Pawar <ni...@gmail.com>
> > > > wrote:
> > > > >
> > > > >> Hey Daniel,
> > > > >>
> > > > >> Need not pass username and password as query parameter.(its not
> GET
> > > > >> method)
> > > > >> Try this:
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/v1/offices?tenantIdentifier=default
> > > > >>
> > > > >> and then you will be asked for username and password.
> > > > >>
> > > > >> You can also use clients like Postman for chrome or RESTClient for
> > > > mozilla
> > > > >> for testing of REST API.
> > > > >>
> > > > >> Regards,
> > > > >> Nikhil
> > > > >>
> > > > >> On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <
> > > dancarl758@gmail.com>
> > > > >> wrote:
> > > > >>
> > > > >> > Hi Terence,
> > > > >> >
> > > > >> > Thanks but I already tried that.
> > > > >> >
> > > > >> > Cheers!
> > > > >> > Daniel Carlson
> > > > >> >
> > > > >> > On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> > > > >> > terence@sanjosesolutions.in> wrote:
> > > > >> >
> > > > >> > > Hi Daniel,
> > > > >> > >
> > > > >> > > The URL you used needs to have
> username=mifos&password=password
> > so
> > > > >> remove
> > > > >> > > the extra %22 codes and try.
> > > > >> > >
> > > > >> > > --
> > > > >> > > Best Regards,
> > > > >> > > Terence Monteiro,
> > > > >> > > Mob: +91 96633 13728
> > > > >> > > www.sanjosesol.com
> > > > >> > >
> > > > >> > > <http://goog_1610728024>
> > > > >> > > "Providence", No. 36,
> > > > >> > > Ahmed Sait Road,
> > > > >> > > Frazer Town, Bangalore - 5.
> > > > >> > >
> > > > >> > > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <
> > > > >> dancarl758@gmail.com>
> > > > >> > > wrote:
> > > > >> > >
> > > > >> > > > Hi,
> > > > >> > > >
> > > > >> > > > I already have those.
> > > > >> > > > When I use my local server, after installing a plugin to
> > enable
> > > > >> CORS, I
> > > > >> > > get
> > > > >> > > > a 500 error code
> > > > >> > > > I am using this link locally:
> > > > >> > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > > >> > > > That is the link from within my code
> > > > >> > > >
> > > > >> > > > And when I try to connect to the online server using this:
> > > > >> > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > > >> > > >
> > > > >> > > > I get a 401 which tells unauthorized but I just used the
> mifos
> > > and
> > > > >> > > password
> > > > >> > > > credentials to login.
> > > > >> > > >
> > > > >> > > > Cheers!
> > > > >> > > > Daniel Carlson
> > > > >> > > >
> > > > >> > > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > > > >> > > > shreyaank@confluxtechnologies.com> wrote:
> > > > >> > > >
> > > > >> > > > > Hi Daniel ,
> > > > >> > > > >
> > > > >> > > > > please add following headers in REST client
> > > > >> > > "Fineract-Platform-TenantId:
> > > > >> > > > > default" and "Content-Type: application/Json"
> > > > >> > > > >
> > > > >> > > > > Regards
> > > > >> > > > > Shreyaank
> > > > >> > > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > > > >> > > > > shreyaank@confluxtechnologies.com> wrote:
> > > > >> > > > >
> > > > >> > > > > > Hi Daniel,
> > > > >> > > > > > To which server your communicating ? Demo server or
> local
> > > > server
> > > > >> > > > > >
> > > > >> > > > > > Regards
> > > > >> > > > > > Shreyaank
> > > > >> > > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <
> > > > dancarl758@gmail.com
> > > > >> >
> > > > >> > > > wrote:
> > > > >> > > > > >
> > > > >> > > > > >> Hi all,
> > > > >> > > > > >>
> > > > >> > > > > >> For my Google Summer of Code project for this year, I
> > need
> > > to
> > > > >> get
> > > > >> > > data
> > > > >> > > > > >> from
> > > > >> > > > > >> the Mifos platform. To that, according to the REST API
> > > > >> > > documentation,
> > > > >> > > > I
> > > > >> > > > > >> have to authenticate that request by by using a basic
> > > > >> > authentication
> > > > >> > > > key
> > > > >> > > > > >> which I then used to make my requests.
> > > > >> > > > > >> I have used this link:
> > > > >> > > > > >>
> > > > >> > > > > >>
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >> > > > > >>
> > > > >> > > > > >> but I get CORS errors despite my header configurations
> > > which
> > > > I
> > > > >> > > copied
> > > > >> > > > > from
> > > > >> > > > > >> the community app.
> > > > >> > > > > >> So I setup my local server and used this link:
> > > > >> > > > > >>
> > > > >> > > > > >>
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >> > > > > >>
> > > > >> > > > > >> Now I get a 500 error code on Firefox and on Chrome I
> > still
> > > > >> get a
> > > > >> > > CORS
> > > > >> > > > > >> error
> > > > >> > > > > >>
> > > > >> > > > > >> Any help with this please?
> > > > >> > > > > >>
> > > > >> > > > > >> Cheers!
> > > > >> > > > > >> Daniel Carlson
> > > > >> > > > > >>
> > > > >> > > > > >
> > > > >> > > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks and Regards
> > > Shreyaank
> > > E-mail:shreyaank@confluxtechnologies.com
> > >
> >
>
>
>
> --
> Thanks and Regards
> Shreyaank
> E-mail:shreyaank@confluxtechnologies.com
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Shreyaank Byadagi <sh...@confluxtechnologies.com>.
Hi daniel,
Which controller is calling the authentication service?

Regards
Shreyaank

On Tue, Jul 12, 2016 at 3:34 PM, Daniel Carlson <da...@gmail.com>
wrote:

> Hi Shreyank,
>
> This is the github link:
> https://github.com/DanCarl857/Mobile-Application/tree/master/frontend-app
>
> Thanks
>
> Cheers!
> Daniel Carlson
>
> On Tue, Jul 12, 2016 at 10:07 AM, Shreyaank Byadagi <
> shreyaank@confluxtechnologies.com> wrote:
>
> > Hi Daniel,
> > Please share your code I will look into your code base and try to fix it
> >
> > Regards
> > Shreyaank
> >
> > On Tue, Jul 12, 2016 at 1:01 PM, Daniel Carlson <da...@gmail.com>
> > wrote:
> >
> > > Hi Shreyaank,
> > >
> > > But when I use that from within my code. Like for example when the user
> > > logs in, they enter their username and password(in this case mifos and
> > > password), I want to use this to log them onto the mifos platform so I
> > use
> > > that call from within my code. But I am getting CORS errors. I had to
> > > download and add a plugin in Chrome which enables that. Could you tell
> > how
> > > to fix this so that it works on all browsers? This is because clients
> > with
> > > Chrome may not have this plugin.
> > >
> > > Cheers!
> > > Daniel Carlson
> > >
> > > On Tue, Jul 12, 2016 at 8:07 AM, Daniel Carlson <da...@gmail.com>
> > > wrote:
> > >
> > > > Hi Nikhil, Terence,
> > > >
> > > > I wanted to do this from within the code as it is part of the login
> > > > service for my app.
> > > >
> > > > Terence that solved it thanks. Many heads are indeed better than one.
> > > >
> > > > Cheers!
> > > > Daniel Carlson
> > > >
> > > >
> > > > On Tue, Jul 12, 2016 at 7:51 AM, Nikhil Pawar <ni...@gmail.com>
> > > wrote:
> > > >
> > > >> Hey Daniel,
> > > >>
> > > >> Need not pass username and password as query parameter.(its not GET
> > > >> method)
> > > >> Try this:
> > > >>
> > > >>
> > >
> >
> https://localhost:8443/fineract-provider/api/v1/offices?tenantIdentifier=default
> > > >>
> > > >> and then you will be asked for username and password.
> > > >>
> > > >> You can also use clients like Postman for chrome or RESTClient for
> > > mozilla
> > > >> for testing of REST API.
> > > >>
> > > >> Regards,
> > > >> Nikhil
> > > >>
> > > >> On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <
> > dancarl758@gmail.com>
> > > >> wrote:
> > > >>
> > > >> > Hi Terence,
> > > >> >
> > > >> > Thanks but I already tried that.
> > > >> >
> > > >> > Cheers!
> > > >> > Daniel Carlson
> > > >> >
> > > >> > On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> > > >> > terence@sanjosesolutions.in> wrote:
> > > >> >
> > > >> > > Hi Daniel,
> > > >> > >
> > > >> > > The URL you used needs to have username=mifos&password=password
> so
> > > >> remove
> > > >> > > the extra %22 codes and try.
> > > >> > >
> > > >> > > --
> > > >> > > Best Regards,
> > > >> > > Terence Monteiro,
> > > >> > > Mob: +91 96633 13728
> > > >> > > www.sanjosesol.com
> > > >> > >
> > > >> > > <http://goog_1610728024>
> > > >> > > "Providence", No. 36,
> > > >> > > Ahmed Sait Road,
> > > >> > > Frazer Town, Bangalore - 5.
> > > >> > >
> > > >> > > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <
> > > >> dancarl758@gmail.com>
> > > >> > > wrote:
> > > >> > >
> > > >> > > > Hi,
> > > >> > > >
> > > >> > > > I already have those.
> > > >> > > > When I use my local server, after installing a plugin to
> enable
> > > >> CORS, I
> > > >> > > get
> > > >> > > > a 500 error code
> > > >> > > > I am using this link locally:
> > > >> > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > >> > > > That is the link from within my code
> > > >> > > >
> > > >> > > > And when I try to connect to the online server using this:
> > > >> > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > >> > > >
> > > >> > > > I get a 401 which tells unauthorized but I just used the mifos
> > and
> > > >> > > password
> > > >> > > > credentials to login.
> > > >> > > >
> > > >> > > > Cheers!
> > > >> > > > Daniel Carlson
> > > >> > > >
> > > >> > > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > > >> > > > shreyaank@confluxtechnologies.com> wrote:
> > > >> > > >
> > > >> > > > > Hi Daniel ,
> > > >> > > > >
> > > >> > > > > please add following headers in REST client
> > > >> > > "Fineract-Platform-TenantId:
> > > >> > > > > default" and "Content-Type: application/Json"
> > > >> > > > >
> > > >> > > > > Regards
> > > >> > > > > Shreyaank
> > > >> > > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > > >> > > > > shreyaank@confluxtechnologies.com> wrote:
> > > >> > > > >
> > > >> > > > > > Hi Daniel,
> > > >> > > > > > To which server your communicating ? Demo server or local
> > > server
> > > >> > > > > >
> > > >> > > > > > Regards
> > > >> > > > > > Shreyaank
> > > >> > > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <
> > > dancarl758@gmail.com
> > > >> >
> > > >> > > > wrote:
> > > >> > > > > >
> > > >> > > > > >> Hi all,
> > > >> > > > > >>
> > > >> > > > > >> For my Google Summer of Code project for this year, I
> need
> > to
> > > >> get
> > > >> > > data
> > > >> > > > > >> from
> > > >> > > > > >> the Mifos platform. To that, according to the REST API
> > > >> > > documentation,
> > > >> > > > I
> > > >> > > > > >> have to authenticate that request by by using a basic
> > > >> > authentication
> > > >> > > > key
> > > >> > > > > >> which I then used to make my requests.
> > > >> > > > > >> I have used this link:
> > > >> > > > > >>
> > > >> > > > > >>
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > >> > > > > >>
> > > >> > > > > >> but I get CORS errors despite my header configurations
> > which
> > > I
> > > >> > > copied
> > > >> > > > > from
> > > >> > > > > >> the community app.
> > > >> > > > > >> So I setup my local server and used this link:
> > > >> > > > > >>
> > > >> > > > > >>
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > >> > > > > >>
> > > >> > > > > >> Now I get a 500 error code on Firefox and on Chrome I
> still
> > > >> get a
> > > >> > > CORS
> > > >> > > > > >> error
> > > >> > > > > >>
> > > >> > > > > >> Any help with this please?
> > > >> > > > > >>
> > > >> > > > > >> Cheers!
> > > >> > > > > >> Daniel Carlson
> > > >> > > > > >>
> > > >> > > > > >
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Thanks and Regards
> > Shreyaank
> > E-mail:shreyaank@confluxtechnologies.com
> >
>



-- 
Thanks and Regards
Shreyaank
E-mail:shreyaank@confluxtechnologies.com

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Daniel Carlson <da...@gmail.com>.
Hi Shreyank,

This is the github link:
https://github.com/DanCarl857/Mobile-Application/tree/master/frontend-app

Thanks

Cheers!
Daniel Carlson

On Tue, Jul 12, 2016 at 10:07 AM, Shreyaank Byadagi <
shreyaank@confluxtechnologies.com> wrote:

> Hi Daniel,
> Please share your code I will look into your code base and try to fix it
>
> Regards
> Shreyaank
>
> On Tue, Jul 12, 2016 at 1:01 PM, Daniel Carlson <da...@gmail.com>
> wrote:
>
> > Hi Shreyaank,
> >
> > But when I use that from within my code. Like for example when the user
> > logs in, they enter their username and password(in this case mifos and
> > password), I want to use this to log them onto the mifos platform so I
> use
> > that call from within my code. But I am getting CORS errors. I had to
> > download and add a plugin in Chrome which enables that. Could you tell
> how
> > to fix this so that it works on all browsers? This is because clients
> with
> > Chrome may not have this plugin.
> >
> > Cheers!
> > Daniel Carlson
> >
> > On Tue, Jul 12, 2016 at 8:07 AM, Daniel Carlson <da...@gmail.com>
> > wrote:
> >
> > > Hi Nikhil, Terence,
> > >
> > > I wanted to do this from within the code as it is part of the login
> > > service for my app.
> > >
> > > Terence that solved it thanks. Many heads are indeed better than one.
> > >
> > > Cheers!
> > > Daniel Carlson
> > >
> > >
> > > On Tue, Jul 12, 2016 at 7:51 AM, Nikhil Pawar <ni...@gmail.com>
> > wrote:
> > >
> > >> Hey Daniel,
> > >>
> > >> Need not pass username and password as query parameter.(its not GET
> > >> method)
> > >> Try this:
> > >>
> > >>
> >
> https://localhost:8443/fineract-provider/api/v1/offices?tenantIdentifier=default
> > >>
> > >> and then you will be asked for username and password.
> > >>
> > >> You can also use clients like Postman for chrome or RESTClient for
> > mozilla
> > >> for testing of REST API.
> > >>
> > >> Regards,
> > >> Nikhil
> > >>
> > >> On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <
> dancarl758@gmail.com>
> > >> wrote:
> > >>
> > >> > Hi Terence,
> > >> >
> > >> > Thanks but I already tried that.
> > >> >
> > >> > Cheers!
> > >> > Daniel Carlson
> > >> >
> > >> > On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> > >> > terence@sanjosesolutions.in> wrote:
> > >> >
> > >> > > Hi Daniel,
> > >> > >
> > >> > > The URL you used needs to have username=mifos&password=password so
> > >> remove
> > >> > > the extra %22 codes and try.
> > >> > >
> > >> > > --
> > >> > > Best Regards,
> > >> > > Terence Monteiro,
> > >> > > Mob: +91 96633 13728
> > >> > > www.sanjosesol.com
> > >> > >
> > >> > > <http://goog_1610728024>
> > >> > > "Providence", No. 36,
> > >> > > Ahmed Sait Road,
> > >> > > Frazer Town, Bangalore - 5.
> > >> > >
> > >> > > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <
> > >> dancarl758@gmail.com>
> > >> > > wrote:
> > >> > >
> > >> > > > Hi,
> > >> > > >
> > >> > > > I already have those.
> > >> > > > When I use my local server, after installing a plugin to enable
> > >> CORS, I
> > >> > > get
> > >> > > > a 500 error code
> > >> > > > I am using this link locally:
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > >> > > > That is the link from within my code
> > >> > > >
> > >> > > > And when I try to connect to the online server using this:
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > >> > > >
> > >> > > > I get a 401 which tells unauthorized but I just used the mifos
> and
> > >> > > password
> > >> > > > credentials to login.
> > >> > > >
> > >> > > > Cheers!
> > >> > > > Daniel Carlson
> > >> > > >
> > >> > > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > >> > > > shreyaank@confluxtechnologies.com> wrote:
> > >> > > >
> > >> > > > > Hi Daniel ,
> > >> > > > >
> > >> > > > > please add following headers in REST client
> > >> > > "Fineract-Platform-TenantId:
> > >> > > > > default" and "Content-Type: application/Json"
> > >> > > > >
> > >> > > > > Regards
> > >> > > > > Shreyaank
> > >> > > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > >> > > > > shreyaank@confluxtechnologies.com> wrote:
> > >> > > > >
> > >> > > > > > Hi Daniel,
> > >> > > > > > To which server your communicating ? Demo server or local
> > server
> > >> > > > > >
> > >> > > > > > Regards
> > >> > > > > > Shreyaank
> > >> > > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <
> > dancarl758@gmail.com
> > >> >
> > >> > > > wrote:
> > >> > > > > >
> > >> > > > > >> Hi all,
> > >> > > > > >>
> > >> > > > > >> For my Google Summer of Code project for this year, I need
> to
> > >> get
> > >> > > data
> > >> > > > > >> from
> > >> > > > > >> the Mifos platform. To that, according to the REST API
> > >> > > documentation,
> > >> > > > I
> > >> > > > > >> have to authenticate that request by by using a basic
> > >> > authentication
> > >> > > > key
> > >> > > > > >> which I then used to make my requests.
> > >> > > > > >> I have used this link:
> > >> > > > > >>
> > >> > > > > >>
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > >> > > > > >>
> > >> > > > > >> but I get CORS errors despite my header configurations
> which
> > I
> > >> > > copied
> > >> > > > > from
> > >> > > > > >> the community app.
> > >> > > > > >> So I setup my local server and used this link:
> > >> > > > > >>
> > >> > > > > >>
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > >> > > > > >>
> > >> > > > > >> Now I get a 500 error code on Firefox and on Chrome I still
> > >> get a
> > >> > > CORS
> > >> > > > > >> error
> > >> > > > > >>
> > >> > > > > >> Any help with this please?
> > >> > > > > >>
> > >> > > > > >> Cheers!
> > >> > > > > >> Daniel Carlson
> > >> > > > > >>
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>
>
>
> --
> Thanks and Regards
> Shreyaank
> E-mail:shreyaank@confluxtechnologies.com
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Shreyaank Byadagi <sh...@confluxtechnologies.com>.
Hi Daniel,
Please share your code I will look into your code base and try to fix it

Regards
Shreyaank

On Tue, Jul 12, 2016 at 1:01 PM, Daniel Carlson <da...@gmail.com>
wrote:

> Hi Shreyaank,
>
> But when I use that from within my code. Like for example when the user
> logs in, they enter their username and password(in this case mifos and
> password), I want to use this to log them onto the mifos platform so I use
> that call from within my code. But I am getting CORS errors. I had to
> download and add a plugin in Chrome which enables that. Could you tell how
> to fix this so that it works on all browsers? This is because clients with
> Chrome may not have this plugin.
>
> Cheers!
> Daniel Carlson
>
> On Tue, Jul 12, 2016 at 8:07 AM, Daniel Carlson <da...@gmail.com>
> wrote:
>
> > Hi Nikhil, Terence,
> >
> > I wanted to do this from within the code as it is part of the login
> > service for my app.
> >
> > Terence that solved it thanks. Many heads are indeed better than one.
> >
> > Cheers!
> > Daniel Carlson
> >
> >
> > On Tue, Jul 12, 2016 at 7:51 AM, Nikhil Pawar <ni...@gmail.com>
> wrote:
> >
> >> Hey Daniel,
> >>
> >> Need not pass username and password as query parameter.(its not GET
> >> method)
> >> Try this:
> >>
> >>
> https://localhost:8443/fineract-provider/api/v1/offices?tenantIdentifier=default
> >>
> >> and then you will be asked for username and password.
> >>
> >> You can also use clients like Postman for chrome or RESTClient for
> mozilla
> >> for testing of REST API.
> >>
> >> Regards,
> >> Nikhil
> >>
> >> On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <da...@gmail.com>
> >> wrote:
> >>
> >> > Hi Terence,
> >> >
> >> > Thanks but I already tried that.
> >> >
> >> > Cheers!
> >> > Daniel Carlson
> >> >
> >> > On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> >> > terence@sanjosesolutions.in> wrote:
> >> >
> >> > > Hi Daniel,
> >> > >
> >> > > The URL you used needs to have username=mifos&password=password so
> >> remove
> >> > > the extra %22 codes and try.
> >> > >
> >> > > --
> >> > > Best Regards,
> >> > > Terence Monteiro,
> >> > > Mob: +91 96633 13728
> >> > > www.sanjosesol.com
> >> > >
> >> > > <http://goog_1610728024>
> >> > > "Providence", No. 36,
> >> > > Ahmed Sait Road,
> >> > > Frazer Town, Bangalore - 5.
> >> > >
> >> > > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <
> >> dancarl758@gmail.com>
> >> > > wrote:
> >> > >
> >> > > > Hi,
> >> > > >
> >> > > > I already have those.
> >> > > > When I use my local server, after installing a plugin to enable
> >> CORS, I
> >> > > get
> >> > > > a 500 error code
> >> > > > I am using this link locally:
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> >> > > > That is the link from within my code
> >> > > >
> >> > > > And when I try to connect to the online server using this:
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> >> > > >
> >> > > > I get a 401 which tells unauthorized but I just used the mifos and
> >> > > password
> >> > > > credentials to login.
> >> > > >
> >> > > > Cheers!
> >> > > > Daniel Carlson
> >> > > >
> >> > > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> >> > > > shreyaank@confluxtechnologies.com> wrote:
> >> > > >
> >> > > > > Hi Daniel ,
> >> > > > >
> >> > > > > please add following headers in REST client
> >> > > "Fineract-Platform-TenantId:
> >> > > > > default" and "Content-Type: application/Json"
> >> > > > >
> >> > > > > Regards
> >> > > > > Shreyaank
> >> > > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> >> > > > > shreyaank@confluxtechnologies.com> wrote:
> >> > > > >
> >> > > > > > Hi Daniel,
> >> > > > > > To which server your communicating ? Demo server or local
> server
> >> > > > > >
> >> > > > > > Regards
> >> > > > > > Shreyaank
> >> > > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <
> dancarl758@gmail.com
> >> >
> >> > > > wrote:
> >> > > > > >
> >> > > > > >> Hi all,
> >> > > > > >>
> >> > > > > >> For my Google Summer of Code project for this year, I need to
> >> get
> >> > > data
> >> > > > > >> from
> >> > > > > >> the Mifos platform. To that, according to the REST API
> >> > > documentation,
> >> > > > I
> >> > > > > >> have to authenticate that request by by using a basic
> >> > authentication
> >> > > > key
> >> > > > > >> which I then used to make my requests.
> >> > > > > >> I have used this link:
> >> > > > > >>
> >> > > > > >>
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> >> > > > > >>
> >> > > > > >> but I get CORS errors despite my header configurations which
> I
> >> > > copied
> >> > > > > from
> >> > > > > >> the community app.
> >> > > > > >> So I setup my local server and used this link:
> >> > > > > >>
> >> > > > > >>
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> >> > > > > >>
> >> > > > > >> Now I get a 500 error code on Firefox and on Chrome I still
> >> get a
> >> > > CORS
> >> > > > > >> error
> >> > > > > >>
> >> > > > > >> Any help with this please?
> >> > > > > >>
> >> > > > > >> Cheers!
> >> > > > > >> Daniel Carlson
> >> > > > > >>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>



-- 
Thanks and Regards
Shreyaank
E-mail:shreyaank@confluxtechnologies.com

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Daniel Carlson <da...@gmail.com>.
Hi Shreyaank,

But when I use that from within my code. Like for example when the user
logs in, they enter their username and password(in this case mifos and
password), I want to use this to log them onto the mifos platform so I use
that call from within my code. But I am getting CORS errors. I had to
download and add a plugin in Chrome which enables that. Could you tell how
to fix this so that it works on all browsers? This is because clients with
Chrome may not have this plugin.

Cheers!
Daniel Carlson

On Tue, Jul 12, 2016 at 8:07 AM, Daniel Carlson <da...@gmail.com>
wrote:

> Hi Nikhil, Terence,
>
> I wanted to do this from within the code as it is part of the login
> service for my app.
>
> Terence that solved it thanks. Many heads are indeed better than one.
>
> Cheers!
> Daniel Carlson
>
>
> On Tue, Jul 12, 2016 at 7:51 AM, Nikhil Pawar <ni...@gmail.com> wrote:
>
>> Hey Daniel,
>>
>> Need not pass username and password as query parameter.(its not GET
>> method)
>> Try this:
>>
>> https://localhost:8443/fineract-provider/api/v1/offices?tenantIdentifier=default
>>
>> and then you will be asked for username and password.
>>
>> You can also use clients like Postman for chrome or RESTClient for mozilla
>> for testing of REST API.
>>
>> Regards,
>> Nikhil
>>
>> On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <da...@gmail.com>
>> wrote:
>>
>> > Hi Terence,
>> >
>> > Thanks but I already tried that.
>> >
>> > Cheers!
>> > Daniel Carlson
>> >
>> > On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
>> > terence@sanjosesolutions.in> wrote:
>> >
>> > > Hi Daniel,
>> > >
>> > > The URL you used needs to have username=mifos&password=password so
>> remove
>> > > the extra %22 codes and try.
>> > >
>> > > --
>> > > Best Regards,
>> > > Terence Monteiro,
>> > > Mob: +91 96633 13728
>> > > www.sanjosesol.com
>> > >
>> > > <http://goog_1610728024>
>> > > "Providence", No. 36,
>> > > Ahmed Sait Road,
>> > > Frazer Town, Bangalore - 5.
>> > >
>> > > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <
>> dancarl758@gmail.com>
>> > > wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > I already have those.
>> > > > When I use my local server, after installing a plugin to enable
>> CORS, I
>> > > get
>> > > > a 500 error code
>> > > > I am using this link locally:
>> > > >
>> > > >
>> > >
>> >
>> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
>> > > > That is the link from within my code
>> > > >
>> > > > And when I try to connect to the online server using this:
>> > > >
>> > > >
>> > >
>> >
>> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
>> > > >
>> > > > I get a 401 which tells unauthorized but I just used the mifos and
>> > > password
>> > > > credentials to login.
>> > > >
>> > > > Cheers!
>> > > > Daniel Carlson
>> > > >
>> > > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
>> > > > shreyaank@confluxtechnologies.com> wrote:
>> > > >
>> > > > > Hi Daniel ,
>> > > > >
>> > > > > please add following headers in REST client
>> > > "Fineract-Platform-TenantId:
>> > > > > default" and "Content-Type: application/Json"
>> > > > >
>> > > > > Regards
>> > > > > Shreyaank
>> > > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
>> > > > > shreyaank@confluxtechnologies.com> wrote:
>> > > > >
>> > > > > > Hi Daniel,
>> > > > > > To which server your communicating ? Demo server or local server
>> > > > > >
>> > > > > > Regards
>> > > > > > Shreyaank
>> > > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <dancarl758@gmail.com
>> >
>> > > > wrote:
>> > > > > >
>> > > > > >> Hi all,
>> > > > > >>
>> > > > > >> For my Google Summer of Code project for this year, I need to
>> get
>> > > data
>> > > > > >> from
>> > > > > >> the Mifos platform. To that, according to the REST API
>> > > documentation,
>> > > > I
>> > > > > >> have to authenticate that request by by using a basic
>> > authentication
>> > > > key
>> > > > > >> which I then used to make my requests.
>> > > > > >> I have used this link:
>> > > > > >>
>> > > > > >>
>> > > > >
>> > > >
>> > >
>> >
>> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
>> > > > > >>
>> > > > > >> but I get CORS errors despite my header configurations which I
>> > > copied
>> > > > > from
>> > > > > >> the community app.
>> > > > > >> So I setup my local server and used this link:
>> > > > > >>
>> > > > > >>
>> > > > >
>> > > >
>> > >
>> >
>> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
>> > > > > >>
>> > > > > >> Now I get a 500 error code on Firefox and on Chrome I still
>> get a
>> > > CORS
>> > > > > >> error
>> > > > > >>
>> > > > > >> Any help with this please?
>> > > > > >>
>> > > > > >> Cheers!
>> > > > > >> Daniel Carlson
>> > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Daniel Carlson <da...@gmail.com>.
Hi Nikhil, Terence,

I wanted to do this from within the code as it is part of the login service
for my app.

Terence that solved it thanks. Many heads are indeed better than one.

Cheers!
Daniel Carlson


On Tue, Jul 12, 2016 at 7:51 AM, Nikhil Pawar <ni...@gmail.com> wrote:

> Hey Daniel,
>
> Need not pass username and password as query parameter.(its not GET method)
> Try this:
>
> https://localhost:8443/fineract-provider/api/v1/offices?tenantIdentifier=default
>
> and then you will be asked for username and password.
>
> You can also use clients like Postman for chrome or RESTClient for mozilla
> for testing of REST API.
>
> Regards,
> Nikhil
>
> On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <da...@gmail.com>
> wrote:
>
> > Hi Terence,
> >
> > Thanks but I already tried that.
> >
> > Cheers!
> > Daniel Carlson
> >
> > On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> > terence@sanjosesolutions.in> wrote:
> >
> > > Hi Daniel,
> > >
> > > The URL you used needs to have username=mifos&password=password so
> remove
> > > the extra %22 codes and try.
> > >
> > > --
> > > Best Regards,
> > > Terence Monteiro,
> > > Mob: +91 96633 13728
> > > www.sanjosesol.com
> > >
> > > <http://goog_1610728024>
> > > "Providence", No. 36,
> > > Ahmed Sait Road,
> > > Frazer Town, Bangalore - 5.
> > >
> > > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <dancarl758@gmail.com
> >
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I already have those.
> > > > When I use my local server, after installing a plugin to enable
> CORS, I
> > > get
> > > > a 500 error code
> > > > I am using this link locally:
> > > >
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > > That is the link from within my code
> > > >
> > > > And when I try to connect to the online server using this:
> > > >
> > > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > >
> > > > I get a 401 which tells unauthorized but I just used the mifos and
> > > password
> > > > credentials to login.
> > > >
> > > > Cheers!
> > > > Daniel Carlson
> > > >
> > > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > > > shreyaank@confluxtechnologies.com> wrote:
> > > >
> > > > > Hi Daniel ,
> > > > >
> > > > > please add following headers in REST client
> > > "Fineract-Platform-TenantId:
> > > > > default" and "Content-Type: application/Json"
> > > > >
> > > > > Regards
> > > > > Shreyaank
> > > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > > > > shreyaank@confluxtechnologies.com> wrote:
> > > > >
> > > > > > Hi Daniel,
> > > > > > To which server your communicating ? Demo server or local server
> > > > > >
> > > > > > Regards
> > > > > > Shreyaank
> > > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com>
> > > > wrote:
> > > > > >
> > > > > >> Hi all,
> > > > > >>
> > > > > >> For my Google Summer of Code project for this year, I need to
> get
> > > data
> > > > > >> from
> > > > > >> the Mifos platform. To that, according to the REST API
> > > documentation,
> > > > I
> > > > > >> have to authenticate that request by by using a basic
> > authentication
> > > > key
> > > > > >> which I then used to make my requests.
> > > > > >> I have used this link:
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > > >>
> > > > > >> but I get CORS errors despite my header configurations which I
> > > copied
> > > > > from
> > > > > >> the community app.
> > > > > >> So I setup my local server and used this link:
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > > >>
> > > > > >> Now I get a 500 error code on Firefox and on Chrome I still get
> a
> > > CORS
> > > > > >> error
> > > > > >>
> > > > > >> Any help with this please?
> > > > > >>
> > > > > >> Cheers!
> > > > > >> Daniel Carlson
> > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Nikhil Pawar <ni...@gmail.com>.
Hey Daniel,

Need not pass username and password as query parameter.(its not GET method)
Try this:
https://localhost:8443/fineract-provider/api/v1/offices?tenantIdentifier=default

and then you will be asked for username and password.

You can also use clients like Postman for chrome or RESTClient for mozilla
for testing of REST API.

Regards,
Nikhil

On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <da...@gmail.com>
wrote:

> Hi Terence,
>
> Thanks but I already tried that.
>
> Cheers!
> Daniel Carlson
>
> On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> terence@sanjosesolutions.in> wrote:
>
> > Hi Daniel,
> >
> > The URL you used needs to have username=mifos&password=password so remove
> > the extra %22 codes and try.
> >
> > --
> > Best Regards,
> > Terence Monteiro,
> > Mob: +91 96633 13728
> > www.sanjosesol.com
> >
> > <http://goog_1610728024>
> > "Providence", No. 36,
> > Ahmed Sait Road,
> > Frazer Town, Bangalore - 5.
> >
> > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <da...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I already have those.
> > > When I use my local server, after installing a plugin to enable CORS, I
> > get
> > > a 500 error code
> > > I am using this link locally:
> > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > That is the link from within my code
> > >
> > > And when I try to connect to the online server using this:
> > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > >
> > > I get a 401 which tells unauthorized but I just used the mifos and
> > password
> > > credentials to login.
> > >
> > > Cheers!
> > > Daniel Carlson
> > >
> > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > > shreyaank@confluxtechnologies.com> wrote:
> > >
> > > > Hi Daniel ,
> > > >
> > > > please add following headers in REST client
> > "Fineract-Platform-TenantId:
> > > > default" and "Content-Type: application/Json"
> > > >
> > > > Regards
> > > > Shreyaank
> > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > > > shreyaank@confluxtechnologies.com> wrote:
> > > >
> > > > > Hi Daniel,
> > > > > To which server your communicating ? Demo server or local server
> > > > >
> > > > > Regards
> > > > > Shreyaank
> > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com>
> > > wrote:
> > > > >
> > > > >> Hi all,
> > > > >>
> > > > >> For my Google Summer of Code project for this year, I need to get
> > data
> > > > >> from
> > > > >> the Mifos platform. To that, according to the REST API
> > documentation,
> > > I
> > > > >> have to authenticate that request by by using a basic
> authentication
> > > key
> > > > >> which I then used to make my requests.
> > > > >> I have used this link:
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >>
> > > > >> but I get CORS errors despite my header configurations which I
> > copied
> > > > from
> > > > >> the community app.
> > > > >> So I setup my local server and used this link:
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >>
> > > > >> Now I get a 500 error code on Firefox and on Chrome I still get a
> > CORS
> > > > >> error
> > > > >>
> > > > >> Any help with this please?
> > > > >>
> > > > >> Cheers!
> > > > >> Daniel Carlson
> > > > >>
> > > > >
> > > >
> > >
> >
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Shreyaank Byadagi <sh...@confluxtechnologies.com>.
Hi Daniel,

The URL's which your using are basically of POST method which cannot be
accessed through the browser's address bar. And the the URL that you have
mentioned is wrong the right URL is:

https://demo.openmf.org/fineract-provider/api/v1/authentication?username=mifos&password=password&&tenantIdentifier=default
<https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default>
this can be submitted only in REST client. And go through this link:
https://demo.openmf.org/api-docs/apiLive.htm#authenticationbasic




Regards
Shreyaank

On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <da...@gmail.com>
wrote:

> Hi Terence,
>
> Thanks but I already tried that.
>
> Cheers!
> Daniel Carlson
>
> On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> terence@sanjosesolutions.in> wrote:
>
> > Hi Daniel,
> >
> > The URL you used needs to have username=mifos&password=password so remove
> > the extra %22 codes and try.
> >
> > --
> > Best Regards,
> > Terence Monteiro,
> > Mob: +91 96633 13728
> > www.sanjosesol.com
> >
> > <http://goog_1610728024>
> > "Providence", No. 36,
> > Ahmed Sait Road,
> > Frazer Town, Bangalore - 5.
> >
> > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <da...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I already have those.
> > > When I use my local server, after installing a plugin to enable CORS, I
> > get
> > > a 500 error code
> > > I am using this link locally:
> > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > That is the link from within my code
> > >
> > > And when I try to connect to the online server using this:
> > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > >
> > > I get a 401 which tells unauthorized but I just used the mifos and
> > password
> > > credentials to login.
> > >
> > > Cheers!
> > > Daniel Carlson
> > >
> > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > > shreyaank@confluxtechnologies.com> wrote:
> > >
> > > > Hi Daniel ,
> > > >
> > > > please add following headers in REST client
> > "Fineract-Platform-TenantId:
> > > > default" and "Content-Type: application/Json"
> > > >
> > > > Regards
> > > > Shreyaank
> > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > > > shreyaank@confluxtechnologies.com> wrote:
> > > >
> > > > > Hi Daniel,
> > > > > To which server your communicating ? Demo server or local server
> > > > >
> > > > > Regards
> > > > > Shreyaank
> > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com>
> > > wrote:
> > > > >
> > > > >> Hi all,
> > > > >>
> > > > >> For my Google Summer of Code project for this year, I need to get
> > data
> > > > >> from
> > > > >> the Mifos platform. To that, according to the REST API
> > documentation,
> > > I
> > > > >> have to authenticate that request by by using a basic
> authentication
> > > key
> > > > >> which I then used to make my requests.
> > > > >> I have used this link:
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >>
> > > > >> but I get CORS errors despite my header configurations which I
> > copied
> > > > from
> > > > >> the community app.
> > > > >> So I setup my local server and used this link:
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >>
> > > > >> Now I get a 500 error code on Firefox and on Chrome I still get a
> > CORS
> > > > >> error
> > > > >>
> > > > >> Any help with this please?
> > > > >>
> > > > >> Cheers!
> > > > >> Daniel Carlson
> > > > >>
> > > > >
> > > >
> > >
> >
>



-- 
Thanks and Regards
Shreyaank
E-mail:shreyaank@confluxtechnologies.com

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Terence Monteiro <te...@sanjosesolutions.in>.
Daniel,

Also the URL is /api/v1 so include the /v1 part as well.

--
Best Regards,
Terence Monteiro,
Mob: +91 96633 13728
www.sanjosesol.com

<http://goog_1610728024>
"Providence", No. 36,
Ahmed Sait Road,
Frazer Town, Bangalore - 5.

On Tue, Jul 12, 2016 at 12:06 PM, Daniel Carlson <da...@gmail.com>
wrote:

> Hi Terence,
>
> Thanks but I already tried that.
>
> Cheers!
> Daniel Carlson
>
> On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
> terence@sanjosesolutions.in> wrote:
>
> > Hi Daniel,
> >
> > The URL you used needs to have username=mifos&password=password so remove
> > the extra %22 codes and try.
> >
> > --
> > Best Regards,
> > Terence Monteiro,
> > Mob: +91 96633 13728
> > www.sanjosesol.com
> >
> > <http://goog_1610728024>
> > "Providence", No. 36,
> > Ahmed Sait Road,
> > Frazer Town, Bangalore - 5.
> >
> > On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <da...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I already have those.
> > > When I use my local server, after installing a plugin to enable CORS, I
> > get
> > > a 500 error code
> > > I am using this link locally:
> > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > > That is the link from within my code
> > >
> > > And when I try to connect to the online server using this:
> > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > >
> > > I get a 401 which tells unauthorized but I just used the mifos and
> > password
> > > credentials to login.
> > >
> > > Cheers!
> > > Daniel Carlson
> > >
> > > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > > shreyaank@confluxtechnologies.com> wrote:
> > >
> > > > Hi Daniel ,
> > > >
> > > > please add following headers in REST client
> > "Fineract-Platform-TenantId:
> > > > default" and "Content-Type: application/Json"
> > > >
> > > > Regards
> > > > Shreyaank
> > > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > > > shreyaank@confluxtechnologies.com> wrote:
> > > >
> > > > > Hi Daniel,
> > > > > To which server your communicating ? Demo server or local server
> > > > >
> > > > > Regards
> > > > > Shreyaank
> > > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com>
> > > wrote:
> > > > >
> > > > >> Hi all,
> > > > >>
> > > > >> For my Google Summer of Code project for this year, I need to get
> > data
> > > > >> from
> > > > >> the Mifos platform. To that, according to the REST API
> > documentation,
> > > I
> > > > >> have to authenticate that request by by using a basic
> authentication
> > > key
> > > > >> which I then used to make my requests.
> > > > >> I have used this link:
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >>
> > > > >> but I get CORS errors despite my header configurations which I
> > copied
> > > > from
> > > > >> the community app.
> > > > >> So I setup my local server and used this link:
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > > >>
> > > > >> Now I get a 500 error code on Firefox and on Chrome I still get a
> > CORS
> > > > >> error
> > > > >>
> > > > >> Any help with this please?
> > > > >>
> > > > >> Cheers!
> > > > >> Daniel Carlson
> > > > >>
> > > > >
> > > >
> > >
> >
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Daniel Carlson <da...@gmail.com>.
Hi Terence,

Thanks but I already tried that.

Cheers!
Daniel Carlson

On Tue, Jul 12, 2016 at 7:34 AM, Terence Monteiro <
terence@sanjosesolutions.in> wrote:

> Hi Daniel,
>
> The URL you used needs to have username=mifos&password=password so remove
> the extra %22 codes and try.
>
> --
> Best Regards,
> Terence Monteiro,
> Mob: +91 96633 13728
> www.sanjosesol.com
>
> <http://goog_1610728024>
> "Providence", No. 36,
> Ahmed Sait Road,
> Frazer Town, Bangalore - 5.
>
> On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <da...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I already have those.
> > When I use my local server, after installing a plugin to enable CORS, I
> get
> > a 500 error code
> > I am using this link locally:
> >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> > That is the link from within my code
> >
> > And when I try to connect to the online server using this:
> >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> >
> > I get a 401 which tells unauthorized but I just used the mifos and
> password
> > credentials to login.
> >
> > Cheers!
> > Daniel Carlson
> >
> > On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> > shreyaank@confluxtechnologies.com> wrote:
> >
> > > Hi Daniel ,
> > >
> > > please add following headers in REST client
> "Fineract-Platform-TenantId:
> > > default" and "Content-Type: application/Json"
> > >
> > > Regards
> > > Shreyaank
> > > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > > shreyaank@confluxtechnologies.com> wrote:
> > >
> > > > Hi Daniel,
> > > > To which server your communicating ? Demo server or local server
> > > >
> > > > Regards
> > > > Shreyaank
> > > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com>
> > wrote:
> > > >
> > > >> Hi all,
> > > >>
> > > >> For my Google Summer of Code project for this year, I need to get
> data
> > > >> from
> > > >> the Mifos platform. To that, according to the REST API
> documentation,
> > I
> > > >> have to authenticate that request by by using a basic authentication
> > key
> > > >> which I then used to make my requests.
> > > >> I have used this link:
> > > >>
> > > >>
> > >
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > >>
> > > >> but I get CORS errors despite my header configurations which I
> copied
> > > from
> > > >> the community app.
> > > >> So I setup my local server and used this link:
> > > >>
> > > >>
> > >
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > > >>
> > > >> Now I get a 500 error code on Firefox and on Chrome I still get a
> CORS
> > > >> error
> > > >>
> > > >> Any help with this please?
> > > >>
> > > >> Cheers!
> > > >> Daniel Carlson
> > > >>
> > > >
> > >
> >
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Terence Monteiro <te...@sanjosesolutions.in>.
Hi Daniel,

The URL you used needs to have username=mifos&password=password so remove
the extra %22 codes and try.

--
Best Regards,
Terence Monteiro,
Mob: +91 96633 13728
www.sanjosesol.com

<http://goog_1610728024>
"Providence", No. 36,
Ahmed Sait Road,
Frazer Town, Bangalore - 5.

On Tue, Jul 12, 2016 at 10:46 AM, Daniel Carlson <da...@gmail.com>
wrote:

> Hi,
>
> I already have those.
> When I use my local server, after installing a plugin to enable CORS, I get
> a 500 error code
> I am using this link locally:
>
> https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
> That is the link from within my code
>
> And when I try to connect to the online server using this:
>
> https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
>
> I get a 401 which tells unauthorized but I just used the mifos and password
> credentials to login.
>
> Cheers!
> Daniel Carlson
>
> On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
> shreyaank@confluxtechnologies.com> wrote:
>
> > Hi Daniel ,
> >
> > please add following headers in REST client "Fineract-Platform-TenantId:
> > default" and "Content-Type: application/Json"
> >
> > Regards
> > Shreyaank
> > On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> > shreyaank@confluxtechnologies.com> wrote:
> >
> > > Hi Daniel,
> > > To which server your communicating ? Demo server or local server
> > >
> > > Regards
> > > Shreyaank
> > > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com>
> wrote:
> > >
> > >> Hi all,
> > >>
> > >> For my Google Summer of Code project for this year, I need to get data
> > >> from
> > >> the Mifos platform. To that, according to the REST API documentation,
> I
> > >> have to authenticate that request by by using a basic authentication
> key
> > >> which I then used to make my requests.
> > >> I have used this link:
> > >>
> > >>
> >
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > >>
> > >> but I get CORS errors despite my header configurations which I copied
> > from
> > >> the community app.
> > >> So I setup my local server and used this link:
> > >>
> > >>
> >
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> > >>
> > >> Now I get a 500 error code on Firefox and on Chrome I still get a CORS
> > >> error
> > >>
> > >> Any help with this please?
> > >>
> > >> Cheers!
> > >> Daniel Carlson
> > >>
> > >
> >
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Daniel Carlson <da...@gmail.com>.
Hi,

I already have those.
When I use my local server, after installing a plugin to enable CORS, I get
a 500 error code
I am using this link locally:
https://localhost:8443/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default
That is the link from within my code

And when I try to connect to the online server using this:
https://demo.openmf.org/fineract-provider/api/authentication?username=%22mifos%22&password=%22password%22&tenantIdentifier=default

I get a 401 which tells unauthorized but I just used the mifos and password
credentials to login.

Cheers!
Daniel Carlson

On Tue, Jul 12, 2016 at 6:03 AM, Shreyaank Byadagi <
shreyaank@confluxtechnologies.com> wrote:

> Hi Daniel ,
>
> please add following headers in REST client "Fineract-Platform-TenantId:
> default" and "Content-Type: application/Json"
>
> Regards
> Shreyaank
> On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
> shreyaank@confluxtechnologies.com> wrote:
>
> > Hi Daniel,
> > To which server your communicating ? Demo server or local server
> >
> > Regards
> > Shreyaank
> > On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com> wrote:
> >
> >> Hi all,
> >>
> >> For my Google Summer of Code project for this year, I need to get data
> >> from
> >> the Mifos platform. To that, according to the REST API documentation, I
> >> have to authenticate that request by by using a basic authentication key
> >> which I then used to make my requests.
> >> I have used this link:
> >>
> >>
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> >>
> >> but I get CORS errors despite my header configurations which I copied
> from
> >> the community app.
> >> So I setup my local server and used this link:
> >>
> >>
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
> >>
> >> Now I get a 500 error code on Firefox and on Chrome I still get a CORS
> >> error
> >>
> >> Any help with this please?
> >>
> >> Cheers!
> >> Daniel Carlson
> >>
> >
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Shreyaank Byadagi <sh...@confluxtechnologies.com>.
Hi Daniel ,

please add following headers in REST client "Fineract-Platform-TenantId:
default" and "Content-Type: application/Json"

Regards
Shreyaank
On 12-Jul-2016 10:29 AM, "Shreyaank Byadagi" <
shreyaank@confluxtechnologies.com> wrote:

> Hi Daniel,
> To which server your communicating ? Demo server or local server
>
> Regards
> Shreyaank
> On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com> wrote:
>
>> Hi all,
>>
>> For my Google Summer of Code project for this year, I need to get data
>> from
>> the Mifos platform. To that, according to the REST API documentation, I
>> have to authenticate that request by by using a basic authentication key
>> which I then used to make my requests.
>> I have used this link:
>>
>> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
>>
>> but I get CORS errors despite my header configurations which I copied from
>> the community app.
>> So I setup my local server and used this link:
>>
>> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
>>
>> Now I get a 500 error code on Firefox and on Chrome I still get a CORS
>> error
>>
>> Any help with this please?
>>
>> Cheers!
>> Daniel Carlson
>>
>

Re: GSOC 2016 - Authentication on the Mifos REST API

Posted by Shreyaank Byadagi <sh...@confluxtechnologies.com>.
Hi Daniel,
To which server your communicating ? Demo server or local server

Regards
Shreyaank
On 12-Jul-2016 10:01 AM, "Daniel Carlson" <da...@gmail.com> wrote:

> Hi all,
>
> For my Google Summer of Code project for this year, I need to get data from
> the Mifos platform. To that, according to the REST API documentation, I
> have to authenticate that request by by using a basic authentication key
> which I then used to make my requests.
> I have used this link:
>
> https://demo.openmf.org/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
>
> but I get CORS errors despite my header configurations which I copied from
> the community app.
> So I setup my local server and used this link:
>
> https://localhost:8443/fineract-provider/api/authentication?username=mifos&password=password&&tenantIdentifier=default
>
> Now I get a 500 error code on Firefox and on Chrome I still get a CORS
> error
>
> Any help with this please?
>
> Cheers!
> Daniel Carlson
>