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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/lib/generators/oxd/templates/oxd_config.rb +1 -0
- data/lib/oxd-ruby.rb +1 -1
- data/lib/oxd/client_oxd_commands.rb +1 -1
- data/lib/oxd/config.rb +4 -1
- data/lib/oxd/oxd_connector.rb +1 -1
- data/lib/oxd/uma_commands.rb +5 -2
- data/lib/oxd/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b21991ea6ec4e37694cc3d80778b2338fdca73410b57ff5a3440734efb7e60e2
|
4
|
+
data.tar.gz: 55122a2df79c68673eeda72e75d5ae7f224f14a8442ec0a766aa80dc5f383215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7ff01264e6a066ed817d84abb82a4602899eefd16088a34e51716fc5152238ec95630048ab6c3c4a837ec23962c9f780bc0e1a81c36ac07c82ad9533878da32
|
7
|
+
data.tar.gz: 6fbf1878a31cb2c6aa36c7c5408d50287c34474ea0ad455ad3cc42746216b42f4f0915365d098da4c3133d6cacc805350c0b5b91e398be6dc04074da3b836f99
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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.
|
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"
|
data/lib/oxd-ruby.rb
CHANGED
data/lib/oxd/config.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'active_support/configurable'
|
2
2
|
|
3
3
|
# @author Inderpal Singh
|
4
|
-
# @note supports oxd-version 3.1.
|
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
|
data/lib/oxd/oxd_connector.rb
CHANGED
data/lib/oxd/uma_commands.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# @author Inderpal Singh
|
2
|
-
# @note supports oxd-version 3.1.
|
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
|
data/lib/oxd/version.rb
CHANGED
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.
|
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-
|
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:
|
111
|
+
version: 1.3.1
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
114
|
rubygems_version: 2.7.2
|