Testing with custom jwt token for backend
mongeta opened this issue · 5 comments
Hello, this is not an issue, is somewhat like a question ;-)
I want to add acceptance testing, how can I accomplish it? My backend, needs always a token, for testing, development, staging, or production.
In my ember app, the user enters name & password, and the token gets back from the server.
Can I generate a token manually with your add-on and pass it to the authenticateSession() ?
Or should I look for a new different approach?
thanks!
I haven't tested this, but I think you can call the restore
method with something like this as the input:
{
token: 'a.eyJleHAiOjE1MzU1NzcyMzguNjc1fQ==.b',
exp: 1535577238.675,
refresh_token: 'OTFkZjQ3YTgtOGM3Zi00NDExLTk4ZTctNDNiZmQzMmRmNWM0'
}
Closing due to no response.
Sorry, I've been busy with other work, 'mea culpa', it's on my 'todo list'
@mongeta Just let me know if using the restore
method doesn't work.
I'll do, thanks