Closed pvmeijel closed 8 years ago
You need to write what I've poorly named a "partial auth function" that parses the URL parameters and add it to your API configuration. It'll look something like:
var Api.V1 = new Restivus({
useDefaultAuth: true,
version: 'v1'
auth: {
user: function () {
return {
userId: this.urlParams.userId,
token: this.urlParams.token
};
}
}
});
Restivus will then validate the userId
and token
you return (using the default auth). I'm going to close this issue, but feel free to continue the discussion or reopen it if you have any difficulty getting this to work. Thanks for the question!
I would like to be able to pass the authentication token and user id as URL parameters, rather than as headers.