roshan 0.2.0 → 1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0055e8aa3b1bd5697131a31ddf3cef98e7c1a3d
4
- data.tar.gz: acb0b9b19cdd4d5bafc16b1ac9561785713d6747
3
+ metadata.gz: a44fe318aff2b4a3cd08c149c2c62b04552397be
4
+ data.tar.gz: 68c918fa0dc8ded652aa40d05841895efb322a0f
5
5
  SHA512:
6
- metadata.gz: f48ce95bb09e2086f4d8b40e2239337b2ff01902666d693e10e325c751de543331faa420ae201f11481fba694488234cf7afba91e76b2763815c88197c5320de
7
- data.tar.gz: 17d924273b757a2650e4a6d605c71b52b52ebf97f83c488d323ed9fa21bc5595f7f951e797da4c9ef0e391f607566bed85eb547ceff39e4cc1bf0f32db461290
6
+ metadata.gz: 93abbb9e735e482abe45b903cc5c86050719b06e09b769095a54487990b359551dca093b45a2e81c46c818328d42fab3f96b3f5d3484a23952843e3785529de5
7
+ data.tar.gz: ecac16f4a4b6c662b2a465db5eea228b4043148795c7da22416df2b1f59fee39f92718700f980ca24264119883323441fe35ee5927529299937af790e71877be
data/lib/roshan.rb CHANGED
@@ -1,53 +1,8 @@
1
1
  require "roshan/version"
2
2
 
3
3
  module Roshan
4
-
5
-
6
- def ros(user)
7
-
8
-
9
- if(user.present?)
10
- salt = SecureRandom.hex
11
- key = ActiveSupport::KeyGenerator.new('R0sH@nSh!nx').generate_key(salt)
12
- crypt = ActiveSupport::MessageEncryptor.new(key)
13
- token = crypt.encrypt_and_sign(SecureRandom.uuid)
14
- authentication_id = crypt.encrypt_and_sign((Time.now + 1.years).to_s(:number))
15
- refresh_token = crypt.encrypt_and_sign(SecureRandom.uuid)
16
- token = crypt.encrypt_and_sign(SecureRandom.uuid)
17
- authentication = crypt.encrypt_and_sign(user.to_json)
18
- #crypt.decrypt_and_verify(encrypted_data)
19
- oauthAccessToken = OauthAccessToken.new
20
- oauthAccessToken.token_id = salt
21
- oauthAccessToken.token = token
22
- oauthAccessToken.user_name = user.email
23
- oauthAccessToken.client_id = "Sph!xn"
24
- oauthAccessToken.authentication_id = authentication_id
25
- oauthAccessToken.refresh_token = refresh_token
26
- oauthAccessToken.authentication = authentication
27
- oauthAccessToken.save
28
- render :json => {
29
- "access_token": "3bc9471b-dfd4-4b84-9095-cce14d144bcf",
30
- "token_type": "bearer",
31
- "refresh_token": "1b52c761-15ee-42cc-8178-8c6d6b16d929",
32
- "expires_in": 86399,
33
- "scope": "read write"
34
- }.to_json
35
- return
36
- end
37
-
38
-
39
- render :json => { :errors => "Invalid username and password"}.to_json, :status => 401
40
- end
41
-
42
- def mahajan(user)
43
4
 
44
- render :json => {
45
- "access_token": "3bc9471b-dfd4-4b84-9095-cce14d144bcf",
46
- "token_type": "bearer",
47
- "refresh_token": "1b52c761-15ee-42cc-8178-8c6d6b16d929",
48
- "expires_in": 86399,
49
- "scope": "read write"
50
- }.to_json
51
- end
52
-
5
+ def Mahajan
6
+ puts "Hello Roshan"
7
+ end
53
8
  end
@@ -1,3 +1,3 @@
1
1
  module Roshan
2
- VERSION = "0.2.0"
2
+ VERSION = "0.1.0"
3
3
  end
data/roshan.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'roshan/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "roshan"
8
- spec.version = Roshan::VERSION
8
+ spec.version = "1.0"
9
9
  spec.authors = ["Roshan"]
10
10
  spec.email = ["roshan@sphinx-solution.com"]
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roshan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roshan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler