greenkeeper[bot] on semver-7.0.0
chore(package): update semver t… (compare)
greenkeeper[bot] on can-super-model-2.0.0
fix(package): update can-super-… (compare)
greenkeeper[bot] on can-define-rest-model-2.0.0
fix(package): update can-define… (compare)
greenkeeper[bot] on can-define-realtime-rest-model-2.0.0
fix(package): update can-define… (compare)
greenkeeper[bot] on can-connect-ndjson-2.0.0
fix(package): update can-connec… (compare)
greenkeeper[bot] on @octokit
greenkeeper[bot] on @octokit
chore(package): update @octokit… (compare)
greenkeeper[bot] on @octokit
greenkeeper[bot] on @octokit
chore(package): update @octokit… (compare)
any-to-string
converter
Guys, we are working on JWT Authentication (actually any token auth):
And have some issue with modiying how url behavior makes call.
We would like to have something like this:
Entity.connection = connect(
[url, JWTAuth, constructor, constructorStore, canMap, realTime, callbacksOnce], {
url: '/secured/entity',
Map: Entity,
List: Entity.List,
algebra
}
);
The idea is that ajax call that makes url
here:
https://github.com/canjs/can-connect/blob/master/data/url/url.js#L370
Should have tokens as request headers.
The problem is that there is no way how we can pre-configure ajax settings in URL behavior. In order to have beforeSend
section with doing some Auth logic there.
The only option that we found is rewrite ajax function
Entity.connection = connect(
[url, JWTAuth, constructor, constructorStore, canMap, realTime, callbacksOnce], {
url: '/secured/entity',
ajax: authenticatedAjax,
Map: Entity,
List: Entity.List,
algebra
}
);
But in this case we can move all logic to authenticatedAJAX and don't use JWTAuth.
How this best to organize ?