raas-client-rails 0.1.13 → 0.1.14

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: 189e68f5001082d0fb193bc6b1b404a5369df1accf7588eafc006c59f9279005
4
- data.tar.gz: db02286e699cc2ec5e68dcbb0a4b3a3af16b3ef18eacafe7613fa23e54ee817e
3
+ metadata.gz: 0bca6ac232a858b8f876e23b9061e02ddb0a29b08ef0fb97891928e7a5a41bbd
4
+ data.tar.gz: ac59b74d7439972836b87abe6fae7c4b28c31ddde6d96202981fa1ce7c413c15
5
5
  SHA512:
6
- metadata.gz: 9704abd258f891323bf8bd504cab7faa283ac89d930d9b04723c91a0e1693c0781a87fb229a10c7264be4af9c8bfed6868c6951ae0dc0e8e132db06863589922
7
- data.tar.gz: 58af69c741721b52a556f3fe2b7fef4f82d70863bf9c88f19fc0423d48c10c276044ffb8af8e7fa88ad09d71565ea3e5dec4eda47f986ed51b9a666d87537486
6
+ metadata.gz: 02622a4c02f015f98ef9fcaa676bc8a8945d00b012b2d51dfd5cf0664ecb6155e71a7864c9e8926a1f47cccc1db05b66b8b341870d940c5286fc5d559cbb0554
7
+ data.tar.gz: 1343474a1b7b19ad092297ec3676bfcdf24df2a489bd52e16bae43d6c4a09fb279eb2b463298d39c5ba5d1b0d3a0e4987749b499b3b63cfa1ee5ea68ca4d9802
data/README.md CHANGED
@@ -26,6 +26,10 @@ Once you install gem and set it up, your application has several extra endpoints
26
26
  - `/raas/report/session` : Generate external session by using your credentials for report
27
27
  - `/raas/datatraveler/session` : Generate external session by using your credentials for datatraveler
28
28
 
29
+ Both session APIs accept an optional `scope` parameter (space-delimited, e.g. `csv_admin.invoice pdf.invoice`)
30
+ for scope-based route restriction. You can also fix it on the server side by setting `@scope`
31
+ in your `prepare_tenant_and_sub` override (see below). If omitted, nothing is sent and the behavior is unchanged.
32
+
29
33
  ## Installation
30
34
 
31
35
  The client is provided as [RubyGem](https://rubygems.org/gems/raas-client-rails),
@@ -54,6 +58,9 @@ class RaasController < Raas::Client::Rails::RaasController
54
58
 
55
59
  @tenant = "xxxxx"
56
60
  @sub = "xxxx"
61
+ # Optional: scopes granted to the current user (space-delimited).
62
+ # Used for scope-based route restriction on RaaS side.
63
+ # @scope = "csv_admin.invoice pdf.invoice"
57
64
  end
58
65
  end
59
66
  ```
@@ -17,7 +17,7 @@ module Raas::Client::Rails
17
17
  @backUrl = params[:backUrl]
18
18
  @subUrl = params[:subUrl]
19
19
  prepare_tenant_and_sub()
20
- @restClient = RestClient.new(@tenant, @sub, @tenant_alias, @sub_alias, @sub_domain)
20
+ @restClient = RestClient.new(@tenant, @sub, @tenant_alias, @sub_alias, @sub_domain, @scope)
21
21
  end
22
22
 
23
23
  def prepare_tenant_and_sub()
@@ -27,6 +27,7 @@ module Raas::Client::Rails
27
27
  @tenant_alias = params[:tenantAlias]
28
28
  @sub_alias = params[:subAlias]
29
29
  @sub_domain = params[:subDomain]
30
+ @scope = params[:scope]
30
31
  end
31
32
 
32
33
  def report_session()
@@ -12,7 +12,7 @@ module Raas::Client::Rails
12
12
  DELETE = "delete"
13
13
  APEX_DOMAIN = "functions.asaservice.inc";
14
14
 
15
- def initialize(tenant, sub, tenant_alias, sub_alias, sub_domain)
15
+ def initialize(tenant, sub, tenant_alias, sub_alias, sub_domain, scope = nil)
16
16
  @application = Raas::Client::Rails::Engine.config.raas_client_rails.application
17
17
  @landscape = Raas::Client::Rails::Engine.config.raas_client_rails.landscape
18
18
  @token = Raas::Client::Rails::Engine.config.raas_client_rails.token
@@ -21,6 +21,7 @@ module Raas::Client::Rails
21
21
  @tenant_alias = tenant_alias
22
22
  @sub_alias = sub_alias
23
23
  @sub_domain = sub_domain
24
+ @scope = scope
24
25
  end
25
26
 
26
27
  def createExternalSession(msa,backUrl,subUrl,subDomain)
@@ -28,6 +29,7 @@ module Raas::Client::Rails
28
29
  body["backUrl"] = backUrl
29
30
  body["subUrl"] = subUrl
30
31
  body["subDomain"] = subDomain || @sub_domain || ""
32
+ body["scope"] = @scope if @scope
31
33
  return proxy(body,POST,"/#{msa}/external/session",nil,@token)
32
34
  end
33
35
 
@@ -1,7 +1,7 @@
1
1
  module Raas
2
2
  module Client
3
3
  module Rails
4
- VERSION = "0.1.13"
4
+ VERSION = "0.1.14"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raas-client-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunao Suzuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-20 00:00:00.000000000 Z
11
+ date: 2026-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails