Coder Social home page Coder Social logo

auth-driver's People

Contributors

davidbanham avatar lyntco avatar nwinch avatar s-taylor avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth-driver's Issues

Use axios supplied basic auth functionality

Currently basic auth is implemented with custom headers as an interceptor for all requests, though axios can support basic auth as an options - from the docs:

// `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
// This will set an `Authorization` header, overwriting any existing
// `Authorization` custom headers you have set using `headers`.
auth: {
  username: 'janedoe',
  password: 's00pers3cret'
}

I suggest we change the auth-driver opts to match axios opts. So this would change:

{
  password: 'secret'
}

to...

{
  auth: {
    username: 'user',
    password: 'secret'
  }
}

By doing this it would remove unnecessary code as the functionality is supported natively.

fetch multiple (using a list of ids)

It would be nice to have a function that allows you to fetch multiple auth records are once given a list of ids. The current search function does not support this.

convert from babel to es6

I don't really see why we need babel for this one. it all could be perfectly expressed in vanilla es6. the .default imports are kind of ugly and we export one thing only. so think we should kick it out for the sake of consistency

implement DELETE

I want to be able to delete auth records for good if i want to. for example for automated testing purposes. at the moment i have to generate uniq emails all the time, which is a bummer and prone to collisions. i want my tests to be pretty

Mock auth instance for tests

Instead of requiring an instance of auth to be running for tests can could mock the calls instead. Unless there is a publicly accessible test version of auth available that can be used for CI tests eg. Travis ?

Maybe follow the CRUD+S naming

Hey,

How about replacing get with read to be consistent with create and update? get's antonym is put, not update. :)

Also, search with no params could be replace getAll.

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.