authi 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/authi.rb +16 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f82d2e9f72b5643cb5689ececfb636eae3a33f85
4
- data.tar.gz: 548972afb8e2444b31fc14a27b7c90db5d2556b3
3
+ metadata.gz: 5ebecea59ce64d2f65ac72affea7b2ce1ccb443a
4
+ data.tar.gz: bb120684e24f4263963a1d92aa1e6efee5b07f97
5
5
  SHA512:
6
- metadata.gz: c11d11832e867ef1c7ac5cf32a61842a54bc50e8d8671758c1088c3fa6fa20141d3d8c08660c865239c6eb4cdadc1902bb168db35d5f210f3a794a9aabf87629
7
- data.tar.gz: 115baafa754e7f56989a848a69460b1fee73b3ce1f5ebfbe0a4508cd5839f98b6dc654aa2cb6e210fbdb714f74d817781710f1e5af6079136a0db64df282df08
6
+ metadata.gz: 3413573cb69ae633cba8fefb86b16cef459b477a7e64f5a3baf91768db0783f2cddc293b5433a3bb429d1132fb07a6b6ff1bfb5792bf8459b4307ef101a51b2e
7
+ data.tar.gz: 231b6c27c3e5ef2ad5c34dd9a7a1affbb6c96a5eb8f98c8106a21f22cb9f8853337b6d90c5009823cf189c620ee65a03a38b0813d75aeced539e59ba86ab36a6
@@ -2,24 +2,24 @@ require 'openssl'
2
2
  require 'base64'
3
3
  require 'securerandom'
4
4
  # Api Authentication Module
5
- # How it works
6
- # Client Side
5
+ # =========================
6
+ # <b>How it works</b>
7
+ # ============
8
+ # <i>Client Side</i>
7
9
  # ===========
8
10
  # A string is first created using your HTTP payload containing all parameters and a preshared key.
9
11
  # This string is then used to create the signature which is a Base64 encoded SHA1 HMAC, using the clients private secret key.
10
- # This signature is then can be added to Authorization HTTP header:
11
- # Authorization = Authy.generate_signed_header(params)
12
- # Now add this to to your header,
13
- # header["Authorization"] = Authorization
14
- # secret_key generated from the server side can be kept inside the a environment variable with name "shared_key" along with "service_name" as your service name
15
- # Server Side
16
- # ===========
17
- # API validation
18
- # --------------
19
- # is_valid = Authy.validate_api(params, request.headers)
20
- # Generating secret key for clients
21
- # ---------------------------------
22
- # secret_key = Authy.generate_secret_key
12
+ # This signature is then can be added to Authorization HTTP header
13
+ # <code>Authorization = Authy.generate_signed_header(params)</code>
14
+ # Now add this to to your header
15
+ # <code>header["Authorization"] = Authorization</code>
16
+ #
17
+ # secret_key generated from the server side can be kept inside the a environment variable with name "shared_key" along with "service_name" as your service name
18
+ #
19
+ # <i>Server Side API validation</i>
20
+ # <code>is_valid = Authy.validate_api(params, request.headers)<code>
21
+ # Generating secret key for clients
22
+ # <code>secret_key = Authy.generate_secret_key<code>
23
23
  module Authy
24
24
  # Create a signed hash using input parameter
25
25
  #
@@ -64,7 +64,7 @@ module Authy
64
64
  [fully_qualified_keys.join(','), map]
65
65
  end
66
66
 
67
- # Utility method to build quary from deep lookup table and parameters
67
+ # Utility method to build query from deep lookup table and parameters
68
68
  def self.build_query(processed_data, deep_lookup_table) # :nodoc:
69
69
  query = []
70
70
  processed_data.split(',').each { |data| query << data + '=' + deep_lookup_table[data].to_s }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nithin Kumar