-
-
Notifications
You must be signed in to change notification settings - Fork 625
Expand file tree
/
Copy pathoauth2.rb
More file actions
45 lines (40 loc) · 1.02 KB
/
oauth2.rb
File metadata and controls
45 lines (40 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# frozen_string_literal: true
# includes modules from stdlib
require "cgi"
require "time"
# third party gems
require "snaky_hash"
require "version_gem"
# includes gem files
require "oauth2/version"
require "oauth2/filtered_attributes"
require "oauth2/error"
require "oauth2/authenticator"
require "oauth2/client"
require "oauth2/strategy/base"
require "oauth2/strategy/auth_code"
require "oauth2/strategy/implicit"
require "oauth2/strategy/password"
require "oauth2/strategy/client_credentials"
require "oauth2/strategy/assertion"
require "oauth2/access_token"
require "oauth2/response"
# The namespace of this library
module OAuth2
OAUTH_DEBUG = ENV.fetch("OAUTH_DEBUG", "false").casecmp("true").zero?
DEFAULT_CONFIG = SnakyHash::SymbolKeyed.new(
silence_extra_tokens_warning: true,
silence_no_tokens_warning: true,
)
@config = DEFAULT_CONFIG.dup
class << self
attr_reader :config
end
def configure
yield @config
end
module_function :configure
end
OAuth2::Version.class_eval do
extend VersionGem::Basic
end