omniauth-vis 0.1.1 → 0.1.3

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
  SHA256:
3
- metadata.gz: d8b432afa787a07d440f818da3dd85c4f41fd2e88120d753008412ab604c4a7d
4
- data.tar.gz: caedc53baba391f1ea8d753b7645344648c9959b11b0fcafeef0073a9597ee74
3
+ metadata.gz: baf176a9f71adbad4ee8ea68b42155e5e05965285c940adca114d7427c051bc3
4
+ data.tar.gz: bbe246db116efa268440e8734c380e3105359f538f9089a2238465bea4340e96
5
5
  SHA512:
6
- metadata.gz: 3bfc2458abb1627789dd5bfc839b1880a5ba2baeae6b86a9aa5f70f87aea8836e434a1a207fd15840ad6353890f82ac47ce3cf21303b3f6f15d76f241885a6b2
7
- data.tar.gz: e0de88030cf8d44c98413f2b180890e4f38d1b4d3056dd8b209ec924c6c67194c91eda14cd75774e0fd8b419a6adf7e8477d37f7dadebf9ea9bf836f9ac2a10d
6
+ metadata.gz: a719d61d694628c41a12a4425a30fa8afac292d7036fffbe9daaed0757031d0fdada1f108247ac7bc9f75f821cdcaf5d0d6b7b365a7cb776a6d0b237461d81dd
7
+ data.tar.gz: e52f71aef29a2d9bf3b5a22aa918b81ffc8ba88f068bbf1ab627f30d2a6f78c9d69ab5fbb841456611faa4d99b00efa30ddbe3f4e5ee123d581d46135abb2d2c
data/lib/vis/api.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # Vipassna Identity Server Service - for server to server Oauth 2 client_credentials grant flow
2
2
  # gets tokens so we can use the VIS API
3
3
  module Vis
4
+ class OauthError < StandardError; end
5
+
4
6
  class Api
5
7
  def initialize(server_url: "https://identity.dhamma.org", client_id:, client_secret:)
6
8
  @client_id = client_id
@@ -24,7 +26,7 @@ module Vis
24
26
  private def check_error!(response_code, response_body_hash)
25
27
  return unless response_body_hash["error"].present? || !response_code.in?(["200", "202"]) # 201 ?
26
28
 
27
- raise Exceptions::VisOauthError,
29
+ raise Vis::OauthError,
28
30
  "#{response_code} Error requesting token from Vipassana Identity Server. "\
29
31
  "#{response_body_hash['error']} #{response_body_hash['error_description']}"
30
32
  end
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.1.1'
5
+ gem.version = '0.1.3'
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.1.1
4
+ version: 0.1.3
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-09-29 00:00:00.000000000 Z
11
+ date: 2023-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2