Rest API for authentication

Re: Aw: Re: Re: Aw: Re: Re: Rest API for authentication

by Camilo Esteban Garzón Casallas -
Number of replies: 7
Hi Fehmi,

Thanks for your help, but I have a question. How can I authenticate a user (in an external restful service) and start session into moodle? I don't need to create courses, just validate if a person exist in the external WS (using username and password) and give him access into moodle.

Thanks!
In reply to Camilo Esteban Garzón Casallas

Re: Aw: Re: Re: Aw: Re: Re: Rest API for authentication

by Hamid Reza Zeinali -

I have same problem,

Could you resolve your problem ?

I like to authenticate some user via API, then when he/she enter my moodle site see content not login page !

In reply to Hamid Reza Zeinali

Re: Aw: Re: Re: Aw: Re: Re: Rest API for authentication

by Ashok Kumar -

Hi Hamid Reza Zeinali,

Did you find a solution for your problem?.

I have the same requirement would really appreciate any help.

In reply to Hamid Reza Zeinali

Re: Aw: Re: Re: Aw: Re: Re: Rest API for authentication

by Camilo Esteban Garzón Casallas -
Hi, sorry I didn't see your message.

I solved it creating a script and using moodle's API but I used a form, people needs to login first and then the script search the user in APIGEE and gives him access to moodle. I don't need the people have access from other site, so I'm not sure if this can work for you. If you want I can share the code.
In reply to Camilo Esteban Garzón Casallas

Re: Aw: Re: Re: Aw: Re: Re: Rest API for authentication

by Ashok Kumar -
Thanks for your reply.

My requirement is that I have an external site where user will login, I have to use this user's details to login to moodle in a new tab, I need to bypass moodle login page entirely and do the user authentication via api call if possible.
I would really appreciate if you could share your code.

Thanks in advance.
In reply to Ashok Kumar

Re: Aw: Re: Re: Aw: Re: Re: Rest API for authentication

by Samuel Oladipupo -

Hello

Please were you able to resolve the issue, I have a similar situation and I don't know how to go about it.

In reply to Samuel Oladipupo

Re: Aw: Re: Re: Aw: Re: Re: Rest API for authentication

by Aruna Kathiriya -
When you call http://yoursite/login/token.php?username=aaaa&password=Bbbb@123&service= 'your new mobile service' ,
if username & password is correct, user will get autenticated first and then you will get token.
This token will be used to perform all other activities respective of the permission granted for that user.

I hope this will help.