wine_bouncer 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.travis.yml +13 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +22 -0
- data/README.md +34 -0
- data/Rakefile +12 -0
- data/lib/wine_bouncer/auth_methods/auth_methods.rb +25 -0
- data/lib/wine_bouncer/errors.rb +6 -0
- data/lib/wine_bouncer/oauth2.rb +115 -0
- data/lib/wine_bouncer/version.rb +3 -0
- data/lib/wine_bouncer.rb +9 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/api/api.rb +35 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +31 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +78 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/doorkeeper.rb +92 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/doorkeeper.en.yml +71 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20140915153344_create_users.rb +9 -0
- data/spec/dummy/db/migrate/20140915160601_create_doorkeeper_tables.rb +41 -0
- data/spec/dummy/db/schema.rb +61 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/access_token.rb +11 -0
- data/spec/factories/application.rb +6 -0
- data/spec/factories/user.rb +5 -0
- data/spec/intergration/oauth2_spec.rb +86 -0
- data/spec/lib/wine_bouncer/auth_methods/auth_methods_spec.rb +51 -0
- data/spec/rails_helper.rb +77 -0
- data/spec/shared/orm/active_record.rb +2 -0
- data/spec/spec_helper.rb +90 -0
- data/wine_bouncer.gemspec +31 -0
- metadata +293 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = true
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
#config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Raises error for missing translations
|
38
|
+
# config.action_view.raise_on_missing_translations = true
|
39
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Precompile additional assets.
|
7
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
8
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,92 @@
|
|
1
|
+
Doorkeeper.configure do
|
2
|
+
# Change the ORM that doorkeeper will use.
|
3
|
+
# Currently supported options are :active_record, :mongoid2, :mongoid3, :mongo_mapper
|
4
|
+
orm :active_record
|
5
|
+
|
6
|
+
# This block will be called to check whether the resource owner is authenticated or not.
|
7
|
+
resource_owner_authenticator do
|
8
|
+
fail "Please configure doorkeeper resource_owner_authenticator block located in #{__FILE__}"
|
9
|
+
# Put your resource owner authentication logic here.
|
10
|
+
# Example implementation:
|
11
|
+
# User.find_by_id(session[:user_id]) || redirect_to(new_user_session_url)
|
12
|
+
end
|
13
|
+
|
14
|
+
# If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
|
15
|
+
# admin_authenticator do
|
16
|
+
# # Put your admin authentication logic here.
|
17
|
+
# # Example implementation:
|
18
|
+
# Admin.find_by_id(session[:admin_id]) || redirect_to(new_admin_session_url)
|
19
|
+
# end
|
20
|
+
|
21
|
+
# Authorization Code expiration time (default 10 minutes).
|
22
|
+
# authorization_code_expires_in 10.minutes
|
23
|
+
|
24
|
+
# Access token expiration time (default 2 hours).
|
25
|
+
# If you want to disable expiration, set this to nil.
|
26
|
+
# access_token_expires_in 2.hours
|
27
|
+
|
28
|
+
# Reuse access token for the same resource owner within an application (disabled by default)
|
29
|
+
# Rationale: https://github.com/doorkeeper-gem/doorkeeper/issues/383
|
30
|
+
# reuse_access_token
|
31
|
+
|
32
|
+
# Issue access tokens with refresh token (disabled by default)
|
33
|
+
# use_refresh_token
|
34
|
+
|
35
|
+
# Provide support for an owner to be assigned to each registered application (disabled by default)
|
36
|
+
# Optional parameter :confirmation => true (default false) if you want to enforce ownership of
|
37
|
+
# a registered application
|
38
|
+
# Note: you must also run the rails g doorkeeper:application_owner generator to provide the necessary support
|
39
|
+
# enable_application_owner :confirmation => false
|
40
|
+
|
41
|
+
# Define access token scopes for your provider
|
42
|
+
# For more information go to
|
43
|
+
# https://github.com/doorkeeper-gem/doorkeeper/wiki/Using-Scopes
|
44
|
+
default_scopes :public
|
45
|
+
optional_scopes :write, :update
|
46
|
+
|
47
|
+
# Change the way client credentials are retrieved from the request object.
|
48
|
+
# By default it retrieves first from the `HTTP_AUTHORIZATION` header, then
|
49
|
+
# falls back to the `:client_id` and `:client_secret` params from the `params` object.
|
50
|
+
# Check out the wiki for more information on customization
|
51
|
+
# client_credentials :from_basic, :from_params
|
52
|
+
|
53
|
+
# Change the way access token is authenticated from the request object.
|
54
|
+
# By default it retrieves first from the `HTTP_AUTHORIZATION` header, then
|
55
|
+
# falls back to the `:access_token` or `:bearer_token` params from the `params` object.
|
56
|
+
# Check out the wiki for more information on customization
|
57
|
+
# access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
|
58
|
+
|
59
|
+
# Change the native redirect uri for client apps
|
60
|
+
# When clients register with the following redirect uri, they won't be redirected to any server and the authorization code will be displayed within the provider
|
61
|
+
# The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
|
62
|
+
# (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
|
63
|
+
#
|
64
|
+
# native_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
|
65
|
+
|
66
|
+
# Specify what grant flows are enabled in array of Strings. The valid
|
67
|
+
# strings and the flows they enable are:
|
68
|
+
#
|
69
|
+
# "authorization_code" => Authorization Code Grant Flow
|
70
|
+
# "implicit" => Implicit Grant Flow
|
71
|
+
# "password" => Resource Owner Password Credentials Grant Flow
|
72
|
+
# "client_credentials" => Client Credentials Grant Flow
|
73
|
+
#
|
74
|
+
# If not specified, Doorkeeper enables all the four grant flows.
|
75
|
+
#
|
76
|
+
# grant_flows %w(authorization_code implicit password client_credentials)
|
77
|
+
|
78
|
+
# Under some circumstances you might want to have applications auto-approved,
|
79
|
+
# so that the user skips the authorization step.
|
80
|
+
# For example if dealing with trusted a application.
|
81
|
+
# skip_authorization do |resource_owner, client|
|
82
|
+
# client.superapp? or resource_owner.admin?
|
83
|
+
# end
|
84
|
+
|
85
|
+
# WWW-Authenticate Realm (default "Doorkeeper").
|
86
|
+
# realm "Doorkeeper"
|
87
|
+
|
88
|
+
# Allow dynamic query parameters (disabled by default)
|
89
|
+
# Some applications require dynamic query parameters on their request_uri
|
90
|
+
# set to true if you want this to be allowed
|
91
|
+
# wildcard_redirect_uri false
|
92
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
en:
|
2
|
+
activerecord:
|
3
|
+
errors:
|
4
|
+
models:
|
5
|
+
application:
|
6
|
+
attributes:
|
7
|
+
redirect_uri:
|
8
|
+
fragment_present: 'cannot contain a fragment.'
|
9
|
+
invalid_uri: 'must be a valid URI.'
|
10
|
+
relative_uri: 'must be an absolute URI.'
|
11
|
+
mongoid:
|
12
|
+
errors:
|
13
|
+
models:
|
14
|
+
application:
|
15
|
+
attributes:
|
16
|
+
redirect_uri:
|
17
|
+
fragment_present: 'cannot contain a fragment.'
|
18
|
+
invalid_uri: 'must be a valid URI.'
|
19
|
+
relative_uri: 'must be an absolute URI.'
|
20
|
+
mongo_mapper:
|
21
|
+
errors:
|
22
|
+
models:
|
23
|
+
application:
|
24
|
+
attributes:
|
25
|
+
redirect_uri:
|
26
|
+
fragment_present: 'cannot contain a fragment.'
|
27
|
+
invalid_uri: 'must be a valid URI.'
|
28
|
+
relative_uri: 'must be an absolute URI.'
|
29
|
+
doorkeeper:
|
30
|
+
errors:
|
31
|
+
messages:
|
32
|
+
# Common error messages
|
33
|
+
invalid_request: 'The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.'
|
34
|
+
invalid_redirect_uri: 'The redirect uri included is not valid.'
|
35
|
+
unauthorized_client: 'The client is not authorized to perform this request using this method.'
|
36
|
+
access_denied: 'The resource owner or authorization server denied the request.'
|
37
|
+
invalid_scope: 'The requested scope is invalid, unknown, or malformed.'
|
38
|
+
server_error: 'The authorization server encountered an unexpected condition which prevented it from fulfilling the request.'
|
39
|
+
temporarily_unavailable: 'The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.'
|
40
|
+
|
41
|
+
#configuration error messages
|
42
|
+
credential_flow_not_configured: 'Resource Owner Password Credentials flow failed due to Doorkeeper.configure.resource_owner_from_credentials being unconfigured.'
|
43
|
+
resource_owner_authenticator_not_configured: 'Resource Owner find failed due to Doorkeeper.configure.resource_owner_authenticator being unconfiged.'
|
44
|
+
|
45
|
+
# Access grant errors
|
46
|
+
unsupported_response_type: 'The authorization server does not support this response type.'
|
47
|
+
|
48
|
+
# Access token errors
|
49
|
+
invalid_client: 'Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.'
|
50
|
+
invalid_grant: 'The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.'
|
51
|
+
unsupported_grant_type: 'The authorization grant type is not supported by the authorization server.'
|
52
|
+
|
53
|
+
# Password Access token errors
|
54
|
+
invalid_resource_owner: 'The provided resource owner credentials are not valid, or resource owner cannot be found'
|
55
|
+
|
56
|
+
invalid_token:
|
57
|
+
revoked: "The access token was revoked"
|
58
|
+
expired: "The access token expired"
|
59
|
+
unknown: "The access token is invalid"
|
60
|
+
|
61
|
+
flash:
|
62
|
+
applications:
|
63
|
+
create:
|
64
|
+
notice: 'Application created.'
|
65
|
+
destroy:
|
66
|
+
notice: 'Application deleted.'
|
67
|
+
update:
|
68
|
+
notice: 'Application updated.'
|
69
|
+
authorized_applications:
|
70
|
+
destroy:
|
71
|
+
notice: 'Application revoked.'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: f3331e00ed5d76db3737b2a0b4ccd79f19d858394ddc4995361813a18b24910af0b010475c7b8520ee35c04511e7d258b04b334131bfafdc119129b9c8d0cb83
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: c65fd1ffec8275651d1fd06ec3a4914ba644bbeb87729594a3b35fb4b7ad4cccd298d77baf63f7a6513d437e5b95eef9637f9c37a9691c3ed41143d8b5f9a5ef
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class CreateDoorkeeperTables < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :oauth_applications do |t|
|
4
|
+
t.string :name, null: false
|
5
|
+
t.string :uid, null: false
|
6
|
+
t.string :secret, null: false
|
7
|
+
t.text :redirect_uri, null: false
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :oauth_applications, :uid, unique: true
|
12
|
+
|
13
|
+
create_table :oauth_access_grants do |t|
|
14
|
+
t.integer :resource_owner_id, null: false
|
15
|
+
t.integer :application_id, null: false
|
16
|
+
t.string :token, null: false
|
17
|
+
t.integer :expires_in, null: false
|
18
|
+
t.text :redirect_uri, null: false
|
19
|
+
t.datetime :created_at, null: false
|
20
|
+
t.datetime :revoked_at
|
21
|
+
t.string :scopes
|
22
|
+
end
|
23
|
+
|
24
|
+
add_index :oauth_access_grants, :token, unique: true
|
25
|
+
|
26
|
+
create_table :oauth_access_tokens do |t|
|
27
|
+
t.integer :resource_owner_id
|
28
|
+
t.integer :application_id
|
29
|
+
t.string :token, null: false
|
30
|
+
t.string :refresh_token
|
31
|
+
t.integer :expires_in
|
32
|
+
t.datetime :revoked_at
|
33
|
+
t.datetime :created_at, null: false
|
34
|
+
t.string :scopes
|
35
|
+
end
|
36
|
+
|
37
|
+
add_index :oauth_access_tokens, :token, unique: true
|
38
|
+
add_index :oauth_access_tokens, :resource_owner_id
|
39
|
+
add_index :oauth_access_tokens, :refresh_token, unique: true
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20140915160601) do
|
15
|
+
|
16
|
+
create_table "oauth_access_grants", force: true do |t|
|
17
|
+
t.integer "resource_owner_id", null: false
|
18
|
+
t.integer "application_id", null: false
|
19
|
+
t.string "token", null: false
|
20
|
+
t.integer "expires_in", null: false
|
21
|
+
t.text "redirect_uri", null: false
|
22
|
+
t.datetime "created_at", null: false
|
23
|
+
t.datetime "revoked_at"
|
24
|
+
t.string "scopes"
|
25
|
+
end
|
26
|
+
|
27
|
+
add_index "oauth_access_grants", ["token"], name: "index_oauth_access_grants_on_token", unique: true
|
28
|
+
|
29
|
+
create_table "oauth_access_tokens", force: true do |t|
|
30
|
+
t.integer "resource_owner_id"
|
31
|
+
t.integer "application_id"
|
32
|
+
t.string "token", null: false
|
33
|
+
t.string "refresh_token"
|
34
|
+
t.integer "expires_in"
|
35
|
+
t.datetime "revoked_at"
|
36
|
+
t.datetime "created_at", null: false
|
37
|
+
t.string "scopes"
|
38
|
+
end
|
39
|
+
|
40
|
+
add_index "oauth_access_tokens", ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true
|
41
|
+
add_index "oauth_access_tokens", ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id"
|
42
|
+
add_index "oauth_access_tokens", ["token"], name: "index_oauth_access_tokens_on_token", unique: true
|
43
|
+
|
44
|
+
create_table "oauth_applications", force: true do |t|
|
45
|
+
t.string "name", null: false
|
46
|
+
t.string "uid", null: false
|
47
|
+
t.string "secret", null: false
|
48
|
+
t.text "redirect_uri", null: false
|
49
|
+
t.datetime "created_at"
|
50
|
+
t.datetime "updated_at"
|
51
|
+
end
|
52
|
+
|
53
|
+
add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true
|
54
|
+
|
55
|
+
create_table "users", force: true do |t|
|
56
|
+
t.string "name"
|
57
|
+
t.datetime "created_at"
|
58
|
+
t.datetime "updated_at"
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|