Module: OpenStax

Defined in:
app/models/openstax/api/api_user.rb,
lib/openstax_api.rb,
lib/openstax_api/engine.rb,
lib/openstax_api/version.rb,
lib/openstax_api/constraints.rb,
lib/openstax_api/route_extensions.rb,
lib/openstax_api/doorkeeper_extensions.rb,
app/controllers/openstax/api/v1/api_controller.rb,
app/controllers/openstax/api/v1/oauth_based_api_controller.rb,
app/representers/openstax/api/v1/representable_schema_printer.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 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