Laravel 5.2 establish web services for mobile app - web-services

I trying to make a back office using laravel 5.2 for my mobile application. Where authentication user could be access of my webservice to fetch information.
I had research on that , I also use JWT plugins but its not fit for me. This plugins can't accept post request.
If you have any idea please share with me.

Related

Authenticate users in my django app using an existing ASP.Net IdentityServer login app

I'm trying to authenticate users in my django app using an existing ASP.Net IdentityServer login app. I've seen the documentation has an example for an angular or react(Javascript based app) but not django. Does anyone have some sample code or tutorial that shows how to do in django? I'm new at this. Especially when it comes to the call back. I'm not sure i need to use an open iD client package to do this. Is it possible to do this in django? Or does it have to be a JS application? I appreciate any assistance
https://identityserver4.readthedocs.io/en/latest/quickstarts/4_javascript_client.html?highlight=authority#add-your-html-and-javascript-files

Laravel OAuth2 authentication for Django Site

I am building a Django application and I need to connect to an existing external Laravel site to authenticate users. Basically to have two different platforms, but users only have one set of credentials. Also - users should be able to sign up on the Django, and their user is created in the Laravel DB.
The Laravel site has Laravel Passport (OAuth2 based) installed because it uses it for a Flutter app.
I know that REMOTE_USER is "the Django way" of achieving external auth but, I don't know where to go from there. If it makes a difference, the Django app will be a full REST application using DRF because its frontend will be ReactJS.
Can anyone explain how to achieve external auth with Django, particularly when the authentication server is OAuth2 based? Or better yet, how it can work with Laravel Passport in particular.
Thanks

When you use DRF(Server API) + React(public Web Client), how do you implement for OAuth2 social login?

I am developing Django(Server) with React(Web Client).
And I want to use facebook social login.
I knew that client is public client, server is confidential. So I want to use authentication code grant way for authenticating user.
So I find out the way but there is no way to implement that. All the python oauth2 library limplements is just for django server side rendering.(Django Server + Web client).
So I confused about I am wrong or just the others just did not make the grant way.
When you use DRF(Server API) + React(public Web Client),
how do you implement for OAuth2 social login?
I wonder that. please give me some advise to me.
Thanks.
Let's start from basics, people usually split frontend and backend to improve the production speed as frontend and backend can be developed by two separate teams. But in order for the frontend and backend to work together, there needs to be a connection interface, an API.
React is a frontend that runs in the browser, so in order to talk to the server, it uses a REST protocol.
As the backend in this scenario is Django we use DRF as React uses REST API. DRF provides easy flexible pre-built packages to carry out this communication job between server and client.
Now the authenticator for web login you choose to be Facebook hence you will get the identity token from facebook, which will correspond to the rows in the Django User table which will give you access to the user's data in Django.
You don't need to do everything at once, you need to first implement the Facebook social auth and after test(test using postman app) only think about connecting React
A good place to start is this DRF documentation, look into Social OAuth2
https://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit

Liferay custom web services

I have some questions about the use of Liferay and Lyferay web services.
I have read the documentation liferay in particular the chapter 11 and 12 (development/Documentation)about the development (or use) of web services in Liferay ... but this documentation does not seem complete than what you can do (Searching on the web you can find different approaches regarding the use of Liferay).
So, here are my questions / concerns ...
Suppose you develop your portlets in Liferay .. This way I can interact with the 'core' of Liferay and also write the front-end of my webapp that will be on Liferay. For example I can authenticate the user in my webapp using the Liferay API.
If I wanted to have an authentication system to access in my web app through my mobile app?
I'm not crazy .. I also would like to have my own mobile app developed with native code. In this case I would expect to have a REST service to interact with Liferay.
I think that, in this case, I have to expose all of the functionality of my web app (portlet) also as web serivices
For example ... we can reason with regard to the user authentication..
I thought that you can:
1. Use the webservice native Liferay to access from the outside.
2. E'possibile to write my own web service.
   In this case, I'll have to write a portlet that is actually a webservice?
   When it might be convenient to implement a CAS?
As Liferay works as regards the user session (for authenticated users)?
   In this case we will provide somehow username and password.
If successful, I will have a token or session ID?
Here I can read:
To call the AXIS web service using credentials, you would use the
following URL syntax:
http://" + userIdAsString + ":" + password + "#[server.com]:[port]/api/secure/axis/" + serviceName
I did not really understand if this should be done only to authorize the untente during login
I probably I am confused but the official documentation for Liferay is not my friend right now: (
Yes you want to use custom portlet services in your native mobile app...
I have written very simple blog for doing exactly this:
Please follow the below link:
http://integrating-java.blogspot.in/2014/04/liferay-mobile-sdk-custom-services-part_4.html
By this you can use your portlet's custom service in your mobile native application.
And best part is you do not have to go through the authentication process if you use Liferay mobile sdk for this thing direct service call is enough.

webservice + facebook-connect

I'm working on a project that consist in an IOS App and a webservice written using django-piston. Right now I'm using basic HTTP Auth use the webservice. Any idea of how can i integrate facebook connect to authenticate users to use the webservice?
Regards,
Emmet
It depends on if you want to authenticate from your iOS app or your web service.
For the iOS app, you can use the iOS SDK:
http://developers.facebook.com/docs/reference/iossdk/authentication/
If you authenticate from here, you should be able to get an authentication token via HTTP if you need to grab information on your web service. If you post more details I'll try to address them.