Giter Site home page Giter Site logo

code-kata-web-service's Introduction

Web service kata

The objective of this code kata is to produce a simple REST web-service, that has durable persistance. For our purposes we will produce an account service. The account service is used to manage customer accounts. A single 'admin' account is pre-populated that allows special functionality.

Functions of the account service

  1. Store the details of a new account (email, password, organisation (optional))
  • also creates a unique account ID and password salt
  • Only an admin can create a new user
  1. Retrieve customer details
  • Look up the details of an account by email address
  • Look up the details of an account by account ID
  • Both return account ID, email, organisation and active status
  1. Authenticate an account by providing an email address and password
  2. Change password
  • Allow an authenticated customer to change their password
  • Allow an admin to change a customer's password
  1. Disable an account (reversible, admins only)
  • A disabled account cannot authenticate
  1. Re-enable a disabled account (admins only)
  • A re-enabled account is the same as an ordinary enabled account
  1. Delete an account (irreversible, admins only)
  • A deleted account cannot authenticate, and is not returned in lookups

Stories 1-3 should be considered a Minimum Viable Product (MVP). Stories 4-7 should be considered as desirable, but not necessary for launch.

Constraints

  • The service must be durable to restarts i.e. although it is free to cache data, upon being restarted it must not lose the account information
  • The passwords must not be stored in plaintext
  • Clients of the service do not need to be authenticated themselves, as they are assumed to be within a secure network i.e. the service is stateless and no session management is required
  • All communication is JSON over HTTP

Tests

The tests are contained in the following Gherkin feature files:

An initial implementation of the system tests is provided. Implementation-specific unit tests are expected.

code-kata-web-service's People

Contributors

sleepyfox avatar

Watchers

 avatar

Forkers

djtango

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.