Module: XSignature

Defined in:
lib/x-signature.rb,
lib/x-signature/version.rb,
lib/x-signature/nonce_validator.rb,
lib/x-signature/request_validator.rb,
lib/x-signature/signature_validator.rb,
lib/x-signature/redis_nonce_validator.rb,
lib/x-signature/hex_signature_validator.rb,
lib/x-signature/rails_request_validator.rb,
lib/x-signature/signature_multi_validator.rb,
lib/x-signature/base64_signature_validator.rb

Defined Under Namespace

Classes: Base64SignatureValidator, Data, HexSignatureValidator, NonceValidator, RailsRequestValidator, RedisNonceValidator, RequestValidator, SignatureMultiValidator, SignatureValidator

Constant Summary collapse

XSignatureError =
Class.new(StandardError)
InvalidNonce =
Class.new(XSignatureError)
InvalidSignature =
Class.new(XSignatureError)
VERSION =
'0.1.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.client_headerObject



29
30
31
# File 'lib/x-signature.rb', line 29

def client_header
  @client_header ||= 'HTTP_X_CLIENT'
end

.nonce_headerObject



33
34
35
# File 'lib/x-signature.rb', line 33

def nonce_header
  @nonce_header ||= 'HTTP_X_NONCE'
end

.signature_headerObject



25
26
27
# File 'lib/x-signature.rb', line 25

def signature_header
  @signature_header ||= 'HTTP_X_SIGNATURE'
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (XSignature)

    the object that the method was called on



37
38
39
# File 'lib/x-signature.rb', line 37

def configure
  yield self
end