Module: Touth
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/touth.rb,
lib/touth/version.rb,
lib/touth/authenticator.rb,
lib/touth/active_record_support.rb,
lib/touth/action_controller_support.rb
Overview
Defined Under Namespace
Modules: ActionControllerSupport, ActiveRecordSupport, Authenticator
Classes: Configuration
Constant Summary
collapse
- VERSION =
'1.1.1'
Class Method Summary
collapse
Class Method Details
.digest(data) ⇒ Object
38
39
40
41
|
# File 'lib/touth.rb', line 38
def digest(data)
@digest_method ||= OpenSSL::Digest.new 'sha256'
OpenSSL::HMAC.digest @digest_method, self.client_secret_key, data
end
|
.method_missing(method_name, *args, &block) ⇒ Object
43
44
45
46
47
48
49
|
# File 'lib/touth.rb', line 43
def method_missing(method_name, *args, &block)
if @config.respond_to? method_name
@config.send method_name, *args, &block
else
super
end
end
|
.respond_to?(method_name, include_private = false) ⇒ Boolean
51
52
53
|
# File 'lib/touth.rb', line 51
def respond_to?(method_name, include_private = false)
@config.respond_to? method_name
end
|
.setup {|@config| ... } ⇒ Object
33
34
35
36
|
# File 'lib/touth.rb', line 33
def setup
@config ||= Configuration.new
yield @config if block_given?
end
|