Seperating authentication to a standalone server

2020-03-11 Thread Suroor Hussain
Hi all,

I have a django application which contains the bulk of my project including
a DRF app to provide REST API to access some of the resources. This REST
API is consumed by a mobile app. The mobile app logs a user in by posting
to an endpoint which returns a token and then uses this token for all
subsequent calls.

Now, because of the size of the project and other factors, it was decided
that we make new and experimental features as seperate services running
independent of the django application, with the only common resource being
the user information. This brought in the problem of needing a common user
authentication.
For example, let's say I have a new 'events' service, written in flask.
Now, my mobile app will talk to both the DRF REST api and the events api,
but I want the user to login/signup on the app only once.
(1) what would be the best way to approach this?

My initial idea was to seperate out the auth part to a seperate server
which will have only the basic user information and all other services will
talk to this server. I went through 'django-oauth-toolkit'  tutorials and I
could get the DRF API work with an access token obtained from the toolkit.
I could also play around with 'django-allauth' social auth and get the
regular django application turn to the toolkit for auth. But this worked
only when both provider and resource were the same server. The DRF part
stopped working once I moved the provider to another django application.

And in both cases I still have no clue as to how to integrate this with the
'events' flask app.

Any pointers to libraries or implementation will also be appreciated.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKAz3b%2BaBQ3V9bnqJEUPiERgmZCEb9JRT8rB8%2BhyDcjSrfDiFA%40mail.gmail.com.


Re: standalone server

2011-02-09 Thread Eric Chamberlain
We've used Twisted with the django ORM for similar uses in the past.


On Feb 8, 2011, at 10:50 PM, rahul jain wrote:

> Hi Guys,
> 
> I would like to create a standalone server using django environment which 
> accepts/receive inputs through socket connections. After that some processing 
> and then updating the database.  
> 
> I created one python server and set the environment variable  but I figured 
> out that as soon as something goes wrong, server crashes and then I have to 
> manually re-run the server. So was not reliable at all.
> 
> Please if someone worked on these kind of issues before where you would like 
> to accept connections from outside not web request, but would like to receive 
> some data from outside through sockets then please let me know how to best 
> deal with it.
> 
> thanks.
> 
> Rahul



--
Eric Chamberlain, Founder
RF.com - http://RF.com/







-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: standalone server

2011-02-09 Thread Shawn Milochik

It sounds like you might be looking for Twisted instead of Django.

http://twistedmatrix.com/trac/

Shawn

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: standalone server

2011-02-09 Thread Cal Leeming [Simplicity Media Ltd]
Hey,

Can you give some examples of what you have tried already?

On Wed, Feb 9, 2011 at 6:50 AM, rahul jain  wrote:

> Hi Guys,
>
> I would like to create a standalone server using django environment which
> accepts/receive inputs through socket connections. After that some
> processing and then updating the database.
>
> I created one python server and set the environment variable  but I figured
> out that as soon as something goes wrong, server crashes and then I have to
> manually re-run the server. So was not reliable at all.
>
> Please if someone worked on these kind of issues before where you would
> like to accept connections from outside not web request, but would like to
> receive some data from outside through sockets then please let me know how
> to best deal with it.
>
> thanks.
>
> Rahul
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



standalone server

2011-02-08 Thread rahul jain
Hi Guys,

I would like to create a standalone server using django environment which
accepts/receive inputs through socket connections. After that some
processing and then updating the database.

I created one python server and set the environment variable  but I figured
out that as soon as something goes wrong, server crashes and then I have to
manually re-run the server. So was not reliable at all.

Please if someone worked on these kind of issues before where you would like
to accept connections from outside not web request, but would like to
receive some data from outside through sockets then please let me know how
to best deal with it.

thanks.

Rahul

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.