Spring Security Oauth + Firebase

0

Good afternoon.

I'm implementing the security layer of my application. I decided that we will use Firebase to perform the authentication, and when it returns the access token to the client it will send that token to my Java server which will check in Firebase if the token is valid and then return a token from my application for the Customer.

My difficulty is in the implementation on my Java server. As I get this token (I know to do with user and password, for example, but not receiving the token) in Spring Security Oauth, I check in Firebase (I already know the implementation of this verification) and if everything goes well return the token to the client ?

    
asked by anonymous 10.10.2016 / 22:20

1 answer

0

It may be cool to use Firebase Queue to perform this kind of complex task. I was writing about him today for my team. Call only:

Firebase Queue is a Firebase module that allows us to create four elements that solve the scaling of our platform in a way that Plone developers could not even imagine in their wettest dreams. A "Queue", or queue, is a place in the database in which you play tasks to complete. The life cycle of each Queue is based on four main concepts: task, worker, spec, and job.

Each "task" is a task represented as an object in the database and can be processed by a worker.

"Workers", or workers, are processes that wait for tasks that are added to the database. With each task added, the workers observe the task spec and decide whether or not to try to process it. The first worker who starts working steals the task for himself and no other worker can interfere in it until he completes the task or returns an error.

The "spec" is a definition of the things the task does in relation to other tasks. You can define links between tasks as "when completing task X, start task Y" or "start task X with these parameters here".

"Job" is a set of specs that define a series of operations to execute in order.

To learn how to implement all this, just read the official guide at link

    
20.10.2016 / 00:35