Giter Club home page Giter Club logo

layervaultapi.objc's People

Contributors

codecaffeine avatar kellysutton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

timshim

layervaultapi.objc's Issues

NSDateFormatterCache Not Saving Correctly

Ryan LeFevre: hey MT
Ryan LeFevre: my console is spewing this every time the client tries to sync
9/2/14 1:09:27.989 PM LayerVault[87077]: No date formatter for queue 'NSOperationQueue Main Queue'. Creating.
9/2/14 1:09:27.989 PM LayerVault[87077]: Saving date formatter cache
Ryan LeFevre: hundreds of times
Matt Thomas: RL, do you see this multiple times?
No date formatter cache. Creating new.
Ryan LeFevre: i didn’t see that

More Unit Tests

Mostly we’ve unit tested a handful of MTLModel objects, but the HTTP clients needs to be tested as well.

Handle Keychain Better

A couple issues:

  • - [LVCHTTPClient uploadLocalFile:toPath:parameters:completion:] assumes the credential is in the keychain. It may not be saved there.
  • The keychain will be shared because AFOAuth2Client uses it’s own item name and uniquely identifies everything by base URL (which will always be api.layervault.com)

Handle Expired Tokens Better

We only check to see if the token is expired when the user first logs in. Unfortunately, that is the only check. If the app is running past token expiration, requests will return 401. Another consideration is that tokens expire based on server time (not client). It’s conceivable that the token might appear unexpired on the client, but expired when it gets to the server.

Proposed handling of expired tokens:

  1. Run request (no pre-flight check).
  2. If server returns 401 Unauthorized, check the tokens expiry.
  3. If expired, re-authenticate with the refresh token.
  4. Re-run the original request.

LVCUser Equality

Persistent properties for equality checking:

  • userID
  • email
  • firstName
  • lastName
  • admin

Transient properties NOT for equality checking:

  • organizations
  • projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.