Module: OpenStax

Defined in:
lib/openstax/api/rspec_helpers.rb,
lib/openstax_api.rb,
lib/openstax/api/roar.rb,
lib/openstax/api/apipie.rb,
lib/openstax/api/engine.rb,
lib/openstax/api/version.rb,
lib/openstax/api/constraints.rb,
app/models/openstax/api/api_user.rb,
lib/openstax/api/routing_mapper_includes.rb,
lib/openstax/api/representable_schema_printer.rb,
app/controllers/openstax/api/v1/api_controller.rb,
lib/openstax/api/doorkeeper_application_includes.rb

Overview

A “user” (lowercase ‘u’) of an API can take one of several forms.

1. It can just be a User (capital 'U') based on session data (e.g. 
   someone who logs into this site and then uses this site's Backbone 
   interface).
2. It can be a combination of a Doorkeeper Application and a User, 
   given via OAuth's Authorization Code or Implicit flows.
3. It can just be a Doorkeeper Application, given through OAuth's
   Client Credentials flow.

This API class gives us a way to abstract out these cases and also gives us accessors to get the Application and User objects, if available.

Defined Under Namespace

Modules: Api