oxd-ruby 1.0.2 → 1.0.4.pre.unstable

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: 44810d1d51584267d4eb543925ea5659b1288398d3d639ec87c0b315e618c3a6
4
- data.tar.gz: 685bee8e40f0e64f5d3eb85148515ece3106bb5995ec730f121de439b8ac92b6
3
+ metadata.gz: b21991ea6ec4e37694cc3d80778b2338fdca73410b57ff5a3440734efb7e60e2
4
+ data.tar.gz: 55122a2df79c68673eeda72e75d5ae7f224f14a8442ec0a766aa80dc5f383215
5
5
  SHA512:
6
- metadata.gz: 63450ead6ca0d9c7c26e86fc8771f215ee3c8247f8fe0701eae65fb7e5fe7ab235740b0b8753e4912e69bb6ae244ab1526049ad49da2be06395eaa219551fe76
7
- data.tar.gz: 8c5f0c1bf3f28d459a28cfa06d4315a366bd1a180c5a6ba7262e61bb746ebe46f40d602b872f55cd46edf4741c78b5c54f2ee545de34a6ea9c734d2c3ebec340
6
+ metadata.gz: b7ff01264e6a066ed817d84abb82a4602899eefd16088a34e51716fc5152238ec95630048ab6c3c4a837ec23962c9f780bc0e1a81c36ac07c82ad9533878da32
7
+ data.tar.gz: 6fbf1878a31cb2c6aa36c7c5408d50287c34474ea0ad455ad3cc42746216b42f4f0915365d098da4c3133d6cacc805350c0b5b91e398be6dc04074da3b836f99
@@ -1,6 +1,10 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [1.0.3] - 2018-04-26
5
+ ### Added
6
+ - new parameter `overwrite` for `uma_rs_protect` command
7
+
4
8
  ## [1.0.2] - 2018-03-05
5
9
  ### Added
6
10
  - support for "client_credentials" `grant_type`
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # oxd-Ruby
2
2
 
3
- oxd-Ruby is a client library for Gluu's OpenID Connect and UMA client software, [oxd](https://gluu.org/docs/oxd/3.1.2/).
3
+ oxd-Ruby is a client library for Gluu's OpenID Connect and UMA client software, [oxd](https://gluu.org/docs/oxd/3.1.3/).
4
4
 
5
- For complete instructions on how to use oxd-ruby, please see the [oxd-ruby docs](https://gluu.org/docs/oxd/3.1.2/libraries/languages/ruby).
5
+ For complete instructions on how to use oxd-ruby, please see the [oxd-ruby docs](https://gluu.org/docs/oxd/3.1.3/libraries/languages/ruby).
@@ -10,6 +10,7 @@ Oxd.configure do |config|
10
10
  config.authorization_redirect_uri = "https://domain.example.com/callback"
11
11
  config.post_logout_redirect_uri = "https://domain.example.com/logout"
12
12
  config.claims_redirect_uri = ["https://domain.example.com/claims"]
13
+ config.overwrite_uma_resource = false
13
14
  config.scope = ["openid","profile", "email", "uma_protection","uma_authorization"]
14
15
  config.grant_types = ["authorization_code","client_credenitals"]
15
16
  config.application_type = "web"
@@ -8,7 +8,7 @@ require 'oxd/uma_commands'
8
8
 
9
9
  # @author Inderpal Singh
10
10
  # Oxd Module namespace
11
- # oxd_version 3.1.2
11
+ # oxd_version 3.1.3
12
12
  module Oxd
13
13
 
14
14
  end
@@ -1,5 +1,5 @@
1
1
  # @author Inderpal Singh
2
- # @note supports oxd-version 3.1.2
2
+ # @note supports oxd-version 3.1.3
3
3
  module Oxd
4
4
 
5
5
  require 'json'
@@ -1,7 +1,7 @@
1
1
  require 'active_support/configurable'
2
2
 
3
3
  # @author Inderpal Singh
4
- # @note supports oxd-version 3.1.2
4
+ # @note supports oxd-version 3.1.3
5
5
  module Oxd
6
6
 
7
7
  # Configures global settings for oxd
@@ -57,6 +57,7 @@ module Oxd
57
57
  config_accessor :claims_redirect_uri
58
58
  config_accessor :op_discovery_path
59
59
  config_accessor :protection_access_token
60
+ config_accessor :overwrite_uma_resource
60
61
 
61
62
  # define param_name writer
62
63
  def param_name
@@ -86,6 +87,7 @@ module Oxd
86
87
  # client_token_endpoint_auth_method: [OPTIONAL]
87
88
  # client_request_uris: [OPTIONAL]
88
89
  # contacts: [OPTIONAL, LIST]
90
+ # overwrite_uma_resource: [OPTIONAL, BOOLEAN] true - to remove existing UMA Resource and register new based on JSON Document, if false then resource protection command will fail with error uma_protection_exists
89
91
 
90
92
  # default values for config
91
93
  configure do |config|
@@ -116,5 +118,6 @@ module Oxd
116
118
  config.protection_access_token = ""
117
119
  config.dynamic_registration = true
118
120
  config.connection_type = 'local'
121
+ config.overwrite_uma_resource = false
119
122
  end
120
123
  end
@@ -5,7 +5,7 @@ require 'json'
5
5
  require 'uri'
6
6
 
7
7
  # @author Inderpal Singh
8
- # @note supports oxd-version 3.1.2
8
+ # @note supports oxd-version 3.1.3
9
9
  module Oxd
10
10
 
11
11
  # A class which takes care of the socket communication with oxd Server.
@@ -1,5 +1,5 @@
1
1
  # @author Inderpal Singh
2
- # @note supports oxd-version 3.1.2
2
+ # @note supports oxd-version 3.1.3
3
3
  module Oxd
4
4
 
5
5
  require 'json'
@@ -66,12 +66,15 @@ module Oxd
66
66
 
67
67
  # @return [STRING] oxd_id
68
68
  # @raise RuntimeError if @resources is nil
69
+ # @note overwrite_uma_resource: [OPTIONAL, BOOLEAN] Set in oxd-config.rb,
70
+ # True - to remove existing UMA Resource and register new based on JSON Document,
71
+ # False - resource protection command will fail with error uma_protection_exists
69
72
  # method to protect resources with UMA resource server
70
73
  def uma_rs_protect
71
74
  trigger_error("Please set resources with uma_add_resource(path, *conditions) method first.") if(@resources.nil?)
72
75
  logger("UMA configuration #{@configuration}")
73
76
  @command = 'uma_rs_protect'
74
- @params = default_params.merge({ "resources" => @resources })
77
+ @params = default_params.merge({ "overwrite" => @configuration.overwrite_uma_resource, "resources" => @resources })
75
78
  request('uma-rs-protect')
76
79
  getResponseData['oxd_id']
77
80
  end
@@ -1,5 +1,5 @@
1
1
  # Gem version
2
2
  module Oxd
3
3
  # version of the oxd-ruby gem
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.4-unstable"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oxd-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4.pre.unstable
5
5
  platform: ruby
6
6
  authors:
7
7
  - inderpal6785
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-27 00:00:00.000000000 Z
11
+ date: 2018-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -106,9 +106,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ">="
109
+ - - ">"
110
110
  - !ruby/object:Gem::Version
111
- version: '0'
111
+ version: 1.3.1
112
112
  requirements: []
113
113
  rubyforge_project:
114
114
  rubygems_version: 2.7.2