Sha256: f390af276b42f891f23400cdb247576f80dc81fe5be17139895a2304b79f29ce
Contents?: true
Size: 1.28 KB
Versions: 1
Compression:
Stored size: 1.28 KB
Contents
module AlexaVerifier # Stores our configuration information # @since 0.2.0 class Configuration attr_accessor :enabled, :verify_uri, :verify_timeliness, :verify_certificate, :verify_signature # Create a new instance of our configuration object that has all of our settings enabled def initialize @enabled = true @verify_uri = true @verify_timeliness = true @verify_certificate = true @verify_signature = true end # Is AlexaVerifier enabled? # # This setting overrides all other settings # # @return [Boolean] def enabled? @enabled end # Should we verify the certificate URI? # # @return [Boolean] def verify_uri? @enabled ? @verify_uri : @enabled end # Should we verify the request's timeliness? # # @return [Boolean] def verify_timeliness? @enabled ? @verify_timeliness : @enabled end # Should we verify that the certificate is 'valid'? # # @return [Boolean] def verify_certificate? @enabled ? @verify_certificate : @enabled end # Should we verify that the request was signed with our certificate? # # @return [Boolean] def verify_signature? @enabled ? @verify_signature : @enabled end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alexa_verifier-1.0.0 | lib/alexa_verifier/configuration.rb |