authi 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/authi.rb +18 -0
  3. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9089618306eec16a3a88d3af587a3e3adccd1344
4
- data.tar.gz: f552033c614fc0b71d51b47a189ed0b9cd025171
3
+ metadata.gz: f82d2e9f72b5643cb5689ececfb636eae3a33f85
4
+ data.tar.gz: 548972afb8e2444b31fc14a27b7c90db5d2556b3
5
5
  SHA512:
6
- metadata.gz: 8362258b86f61f1511aae83b093310062bfd353f538ce3389ee8cdac45fd2b9a56a1139dfe72174dfac376817d10edf70cc22355e064a2544caea26fea520623
7
- data.tar.gz: bb2cc04037bf4181c59a8c96ba79f03c9d6151e9dc77b369236efbeab2527191594e02f40b40af4023e6e36883cd6504d84234c9706d8de7401e752624b88499
6
+ metadata.gz: c11d11832e867ef1c7ac5cf32a61842a54bc50e8d8671758c1088c3fa6fa20141d3d8c08660c865239c6eb4cdadc1902bb168db35d5f210f3a794a9aabf87629
7
+ data.tar.gz: 115baafa754e7f56989a848a69460b1fee73b3ce1f5ebfbe0a4508cd5839f98b6dc654aa2cb6e210fbdb714f74d817781710f1e5af6079136a0db64df282df08
@@ -2,6 +2,24 @@ require 'openssl'
2
2
  require 'base64'
3
3
  require 'securerandom'
4
4
  # Api Authentication Module
5
+ # How it works
6
+ # Client Side
7
+ # ===========
8
+ # A string is first created using your HTTP payload containing all parameters and a preshared key.
9
+ # 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
5
23
  module Authy
6
24
  # Create a signed hash using input parameter
7
25
  #
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nithin Kumar
@@ -14,7 +14,8 @@ description: Authi is a Ruby gem designed to be used both in your client and ser
14
14
  HTTP-based applications. It implements the authentication methods based on HMAC-SHA1
15
15
  encryption algorithm and a pre-shared key.The gem will sign your requests on the
16
16
  client side and authenticate that signature on the server side. It will even generate
17
- the secret keys necessary for your clients to sign their requests.# Client Side
17
+ the secret keys necessary for your clients to sign their requests. Find the documentaion
18
+ to see how it works!
18
19
  email: kv.nithin.90@gmail.com
19
20
  executables: []
20
21
  extensions: []