Authentication - IvanAlvarezEnri/dragon-squad-api GitHub Wiki
JWT
We tried to implement Json Web Token, but when we were implementing it we realized that it will be different using grape.
As grape does not have controllers, the creation of headers has to be different because of the absence of an application controller, and the api.rb of grape is only instanced one time. So as we were stuck at the encode decode of token and is right creation, we look at some other alternatives
Alternatives
-
An alternative we could implement was to consider the use of a custom authenticator, but we would spend too much time and could not finish other priority features.
-
Another way we could try was using callbacks to create headers, but this idea came up later and it was too late to explore it, if we had more time, surely we could make some progress on this feature
So now?
At the moment, we do not have implemented any Authenticator method, but we have created the user model prepared to continue this feature in another moment.