Module: Doorkeeper
- Defined in:
- lib/doorkeeper.rb,
lib/doorkeeper/config.rb,
lib/doorkeeper/engine.rb,
lib/doorkeeper/errors.rb,
lib/doorkeeper/server.rb,
lib/doorkeeper/request.rb,
lib/doorkeeper/version.rb,
lib/doorkeeper/oauth/error.rb,
lib/doorkeeper/oauth/token.rb,
lib/doorkeeper/validations.rb,
lib/doorkeeper/oauth/client.rb,
lib/doorkeeper/oauth/scopes.rb,
lib/doorkeeper/rails/routes.rb,
lib/doorkeeper/request/code.rb,
lib/doorkeeper/models/scopes.rb,
lib/doorkeeper/request/token.rb,
lib/doorkeeper/doorkeeper_for.rb,
lib/doorkeeper/helpers/filter.rb,
lib/doorkeeper/models/expirable.rb,
lib/doorkeeper/models/ownership.rb,
lib/doorkeeper/request/password.rb,
lib/doorkeeper/models/accessible.rb,
lib/doorkeeper/helpers/controller.rb,
lib/doorkeeper/models/application.rb,
lib/doorkeeper/oauth/code_request.rb,
lib/doorkeeper/models/access_grant.rb,
lib/doorkeeper/models/access_token.rb,
lib/doorkeeper/oauth/authorization.rb,
lib/doorkeeper/oauth/code_response.rb,
lib/doorkeeper/oauth/token_request.rb,
lib/doorkeeper/rails/routes/mapper.rb,
lib/doorkeeper/oauth/client/methods.rb,
lib/doorkeeper/oauth/error_response.rb,
lib/doorkeeper/oauth/token_response.rb,
lib/doorkeeper/rails/routes/mapping.rb,
lib/doorkeeper/models/mongoid/scopes.rb,
lib/doorkeeper/request/refresh_token.rb,
lib/doorkeeper/oauth/pre_authorization.rb,
lib/doorkeeper/models/mongoid/revocable.rb,
lib/doorkeeper/oauth/authorization/code.rb,
lib/doorkeeper/oauth/client/credentials.rb,
lib/doorkeeper/oauth/authorization/token.rb,
lib/doorkeeper/oauth/helpers/uri_checker.rb,
lib/doorkeeper/oauth/helpers/unique_token.rb,
lib/doorkeeper/request/authorization_code.rb,
lib/doorkeeper/request/client_credentials.rb,
lib/generators/doorkeeper/views_generator.rb,
lib/doorkeeper/models/mongoid2/application.rb,
lib/doorkeeper/models/mongoid3/application.rb,
lib/doorkeeper/oauth/helpers/scope_checker.rb,
lib/doorkeeper/oauth/refresh_token_request.rb,
lib/doorkeeper/models/couchbase/application.rb,
lib/doorkeeper/models/mongoid2/access_grant.rb,
lib/doorkeeper/models/mongoid2/access_token.rb,
lib/doorkeeper/models/mongoid3/access_grant.rb,
lib/doorkeeper/models/mongoid3/access_token.rb,
app/controllers/doorkeeper/tokens_controller.rb,
lib/doorkeeper/models/couchbase/access_grant.rb,
lib/doorkeeper/models/couchbase/access_token.rb,
lib/doorkeeper/models/mongo_mapper/revocable.rb,
lib/doorkeeper/models/mongo_mapper/application.rb,
lib/doorkeeper/oauth/authorization/uri_builder.rb,
lib/doorkeeper/oauth/client_credentials/issuer.rb,
lib/doorkeeper/models/active_record/application.rb,
lib/doorkeeper/models/mongo_mapper/access_grant.rb,
lib/doorkeeper/models/mongo_mapper/access_token.rb,
lib/doorkeeper/oauth/authorization_code_request.rb,
lib/doorkeeper/oauth/client_credentials/creator.rb,
lib/doorkeeper/oauth/client_credentials_request.rb,
app/controllers/doorkeeper/token_info_controller.rb,
lib/doorkeeper/models/active_record/access_grant.rb,
lib/doorkeeper/models/active_record/access_token.rb,
app/controllers/doorkeeper/application_controller.rb,
app/controllers/doorkeeper/applications_controller.rb,
lib/doorkeeper/oauth/client_credentials/validation.rb,
app/controllers/doorkeeper/authorizations_controller.rb,
lib/generators/doorkeeper/mongo_mapper/indexes_generator.rb
Defined Under Namespace
Modules: Errors, FormErrorsHelper, Generators, Helpers, Models, MongoMapper, OAuth, Rails, Request, Validations
Classes: AccessGrant, AccessToken, AllDoorkeeperFor, Application, ApplicationController, ApplicationOwnerGenerator, ApplicationsController, AuthorizationsController, AuthorizedApplicationsController, Config, DoorkeeperFor, DoorkeeperForBuilder, Engine, InstallGenerator, InvalidSyntax, MigrationGenerator, MissingConfiguration, SelectedDoorkeeperFor, Server, TokenInfoController, TokensController
Constant Summary
collapse
- VERSION =
"0.6.7"
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
14
15
16
|
# File 'lib/doorkeeper/config.rb', line 14
def self.configuration
@config || (raise MissingConfiguration.new)
end
|
8
9
10
11
12
|
# File 'lib/doorkeeper/config.rb', line 8
def self.configure(&block)
@config = Config::Builder.new(&block).build
enable_orm
setup_application_owner if @config.enable_application_owner?
end
|
53
54
55
|
# File 'lib/doorkeeper.rb', line 53
def self.configured?
@config.present?
end
|
.database_installed? ⇒ Boolean
.enable_orm ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/doorkeeper/config.rb', line 18
def self.enable_orm
require "doorkeeper/models/#{@config.orm}/access_grant"
require "doorkeeper/models/#{@config.orm}/access_token"
require "doorkeeper/models/#{@config.orm}/application"
require 'doorkeeper/models/access_grant'
require 'doorkeeper/models/access_token'
require 'doorkeeper/models/application'
end
|
.installed? ⇒ Boolean
61
62
63
|
# File 'lib/doorkeeper.rb', line 61
def self.installed?
configured? && database_installed?
end
|
.setup_application_owner ⇒ Object