omniauth-vis 0.0.8 → 0.0.9
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 +4 -4
- data/README.md +5 -5
- data/lib/vis/api.rb +4 -6
- data/omniauth-vis.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b14af6f1e3470751c7d59576d8f4e36955bbac66993a428c4ad25cc7c0c55c93
|
4
|
+
data.tar.gz: 238c6eb40d541a52ed53c28dec01cffce45f3a96ed145b14cb44d34c943e71aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01120799fc73d04e6efec71f0110728862a4375d46d29a99946420337e8982f5165b95ab443a69ba5fbf3ad0901303afc5d26e2624d38e508afdb4108e77d4a2'
|
7
|
+
data.tar.gz: c07bbb587a80adf75747e9f526b1366c470a060365dd995590742b5955b7cf88fd9a02f0988c79f83f854f2f40dd8d5cdcf449377d24ffd6de7e1d8a41f5bf75
|
data/README.md
CHANGED
@@ -53,17 +53,17 @@ end
|
|
53
53
|
|
54
54
|
```
|
55
55
|
require "vis/api"
|
56
|
-
@vis_api = Vis::Api.new
|
57
|
-
@
|
58
|
-
@
|
56
|
+
@vis_api = Vis::Api.new(client_id: "xx", client_secret: "xx", server_url: "https://identity.dhamma.org")
|
57
|
+
@vis_api.get("api_path")
|
58
|
+
@vis_api.post("api_path", data)
|
59
59
|
```
|
60
60
|
|
61
|
-
Documentation about available api can be found at [https://identity.
|
61
|
+
Documentation about available api can be found at [https://test.identity.dhamma.org/doc](https://test.identity.dhamma.org/doc)
|
62
62
|
|
63
63
|
Example
|
64
64
|
|
65
65
|
```
|
66
|
-
|
66
|
+
@vis_api.post("/api/v1/users", {
|
67
67
|
email: "email@test.com",
|
68
68
|
username: "test",
|
69
69
|
encrypted_password: "xxxxxxxxxx"
|
data/lib/vis/api.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
# gets tokens so we can use the VIS API
|
3
3
|
module Vis
|
4
4
|
class Api
|
5
|
-
def initialize
|
6
|
-
@client_id =
|
7
|
-
@client_secret =
|
8
|
-
@vis_app_url =
|
5
|
+
def initialize(server_url: "https://identity.dhamma.org", client_id:, client_secret:)
|
6
|
+
@client_id = client_id
|
7
|
+
@client_secret = client_secret
|
8
|
+
@vis_app_url = server_url
|
9
9
|
@use_ssl = !Rails.env.development?
|
10
10
|
end
|
11
11
|
|
@@ -30,10 +30,8 @@ module Vis
|
|
30
30
|
end
|
31
31
|
|
32
32
|
private def token_post
|
33
|
-
# uri = URI.parse("#{@vis_app_url})
|
34
33
|
http_client, uri = http_client_and_uri "/oauth/token"
|
35
34
|
request = Net::HTTP::Post.new(uri.request_uri)
|
36
|
-
# request.set_form_data({ "client_id" => @client_id, "client_secret" => @client_secret,
|
37
35
|
request.set_form_data({ "client_id" => @client_id, "client_secret" => @client_secret,
|
38
36
|
"grant_type" => "client_credentials" })
|
39
37
|
http_client.request(request)
|
data/omniauth-vis.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'omniauth-vis'
|
5
|
-
gem.version = '0.0.
|
5
|
+
gem.version = '0.0.9'
|
6
6
|
# gem.license = 'MIT'
|
7
7
|
gem.summary = 'Helper to connect to Vipassna Identity Server'
|
8
8
|
gem.description = 'This allows you to connect to Vipassana identity server with your ruby app'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-vis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dhamma workers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|