Module: Cerberus
- Defined in:
- lib/cerberus.rb,
lib/cerberus/jwt.rb,
lib/cerberus/basic.rb,
lib/cerberus/version.rb
Defined Under Namespace
Classes: Basic, Config, Error, Jwt
Constant Summary collapse
- VERSION =
"0.1.2"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
11 12 13 |
# File 'lib/cerberus.rb', line 11 def config @config end |
Class Method Details
.configure {|config| ... } ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/cerberus.rb', line 14 def self.configure self.config ||= Config.new yield(config) self.config.jwt = OpenStruct.new(self.config.jwt || {}) self.config.jwt.skip_middleware_unless ||= -> { false } self.config.basic = OpenStruct.new(self.config.basic || {}) self.config.basic.enabled ||= -> { true } end |