Comments (3)
i've started on this. here are some notes/questions
git disclaimer
before going any further, please don't be alarmed by the git history, L70-72 of admin/index.js
, or any other sloppiness in the linked sketch. i'm still figuring out git workflows appropriate for these tasks and erring on the side more commits. i'll rebase, etc. before a PR.
nock is awesome!
really glad i took a look at this issue if only for the sake of learning of this lib. answers so many questions about how to do integration testing.
generating fixtures from hoodie-server or elsewhere?
i pretty much pattern-matched the new fixture (not that the placeholder implementation is using it, anyway) and have no idea what the couchdb/hoodie-server wire protocol looks like. i wonder if it might be a good idea to curl
hoodie-server to generate test fixtures? or is there a link to documentation? or more generally, how were the existing fixtures created?
plans for tests
most of the questions here revolve around how to wire up the fixtures. i guess i ought to use the existing accounts.json
to test for the NotFoundError
error condition**?**
plans for implementation
i was thinking about making calls to the admin.accounts
interface from the admin.sessions.add()
implementation in order to, for example, see if a user account exists. is this reasonable, or will the server give enough error information to reject w/ a detailed error**?**
... kind of returns to the "generating fixtures" question, i guess.
misc
thanks for you time. i'm learning a lot and hopefully will catch up on the irc soon.
from hoodie-account-client.
Weclome back @ransomw π we must have missed to invite you to the HoodieHQ Contributors team last time, I fixed that now, you should receive an invitation :)
Could you start a pull request? That will make the discussion simpler I think. Donβt worry at all about the commits, most of the Pull Request have been a huge mess before we cleaned them up ahead of the merge, yours is totally normal in that regard :)
You can take fixtures from the specification here: http://docs.accountjsonapi.apiary.io/ β but I just realised we have no specification to create a session for a user. Sorry for that, we should have realised that before creating the issue.
Iβd suggest we add this route that you can build the feature against:
POST /accounts/{id}/sessions
. The request has no body, we donβt need to send a username because the account is clear, and now password because itβs a request by an admin. The response looks like this:
{
"links": {
"self": "https://example.com/accounts/abc1234/sessions/sessionid123"
},
"data": {
"id": "sessionid123",
"type": "session",
"relationships": {
"account": {
"links": {
"related": "https://example.com/accounts/abc1234"
},
"data": {
"id": "abc1234",
"type": "account"
}
}
}
}
}
This might change as we need to discuss it for the spec, but if it does we can make a follow up issue to adjust your implementation.
Does that work for you?
from hoodie-account-client.
wow, thanks much for the quick reply! was afk for a moment.. yah, we can move discussion to a pr thread.
from hoodie-account-client.
Related Issues (20)
- π― test coverage
- when fetching account from remote succeeds, we should unset `session.invalid` HOT 1
- An in-range update of browserify is breaking the build π¨ HOT 1
- Prevent signIn/Up if already signed in (session exists)
- signIn() does not store the roles property
- account.signOut while offline HOT 7
- Question: why does sign in omit the session information? HOT 2
- An in-range update of uglify-js is breaking the build π¨ HOT 66
- An in-range update of semantic-release is breaking the build π¨ HOT 1
- An in-range update of semantic-release is breaking the build π¨ HOT 1
- An in-range update of semantic-release is breaking the build π¨ HOT 34
- An in-range update of lodash is breaking the build π¨ HOT 4
- The automated release is failing π¨
- An in-range update of nock is breaking the build π¨ HOT 6
- An in-range update of tap-min is breaking the build π¨ HOT 1
- An in-range update of before-after-hook is breaking the build π¨ HOT 5
- An in-range update of npm-run-all is breaking the build π¨ HOT 2
- An in-range update of tape is breaking the build π¨ HOT 9
- An in-range update of rimraf is breaking the build π¨ HOT 3
- An in-range update of browserify is breaking the build π¨ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hoodie-account-client.