sqsc-keycloak-ruby 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bcfeb458a5b9e706a5ff2b3f52c202a116467e162baef55c37c036d26c2c24b
4
- data.tar.gz: cfda2cdf8052ce9fa597228b50d48465475d8e273302ace857e82128da00c829
3
+ metadata.gz: 1a6e6ffe4d42fd40302fbaa10e4e00373576fbbd1aed495b09371bc37b7e09b3
4
+ data.tar.gz: 8947ad39d88f909278b601c03cdd756ff8517e18abacf3bacdc46fc5eccec72b
5
5
  SHA512:
6
- metadata.gz: 7265519c86419e2549612f872e2095cf551d2b83f6a129b28de518d8279d786ec9ffa9a45293622f34244b761138c25487e8ace5e0be3594661e3a834971afe3
7
- data.tar.gz: c0364ca546c67df98c465d21c1bb40756ff667ce1848f90b3b6094bad6ef2a60badd4cce5d1ccef7351ed09284e2826b0718b5bb422edef2d1c27451dd0e2561
6
+ metadata.gz: e3d04dfce599fb9c71249e717450552850cd5bb405101d70c4b27700486454ac34df133b9377b0b13eabfda3eab503a94ac583e5b52a53680255fb5ede0c0dc4
7
+ data.tar.gz: 66d0464de05084e71f7562dd47e17371a4b24bf4751c02b8cb5a3b9151e39ef3ba04875088aa43cb3a1afed8b44602b2c6b103f0c03cd37ac6c15c4f7362d548
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sqsc-keycloak-ruby (1.0.0.pre.1)
4
+ sqsc-keycloak-ruby (1.0.0)
5
5
  json
6
6
  jwt
7
7
  rest-client
data/README.md CHANGED
@@ -137,21 +137,21 @@ The `Keycloak::Client` module has the methods that represent the <b>endpoint</b>
137
137
  We will detail each of these methods:
138
138
 
139
139
  ```ruby
140
- Keycloak::Client.get_token(user, password, client_id = '', secret = '')
140
+ Keycloak::Client.get_token(user, password, client_id = '', secret = '', scope = nil)
141
141
  ```
142
142
 
143
143
  If you choose to authenticate users using the screen of your own application, then use this method. Simply invoke it in the method of login in the `controller` defined with the session controller of your application, passing as parameter the <b>user</b> and the <b>password</b> informed by the user. If the authentication is valid, then a JSON containing the `access_token` and the `refresh_token` is returned.
144
144
 
145
145
 
146
146
  ```ruby
147
- Keycloak::Client.url_login_redirect(redirect_uri, response_type = 'code')
147
+ Keycloak::Client.url_login_redirect(redirect_uri, response_type = 'code', client_id = '', authorization_endpoint = '', scope = nil)
148
148
  ```
149
149
 
150
150
  To authenticate the users of your application using a template configured in Keycloak, redirect the request to the url returned in this method. Pass as a parameter the url that the user will have access in case of successful authentication (`redirect_uri`) and also the type of response (`response_type`), which if not informed, gem will assume the `code` value. If the authentication is successful, then a `code` will be returned that will enable you to request a token from <b>Keycloak</b>.
151
151
 
152
152
 
153
153
  ```ruby
154
- Keycloak::Client.get_token_by_code(code, redirect_uri, client_id = '', secret = '')
154
+ Keycloak::Client.get_token_by_code(code, redirect_uri, client_id = '', secret = '', scope = nil)
155
155
  ```
156
156
 
157
157
  When using the `Keycloak::Client.url_login_redirect` method to get a `code`, pass it as a parameter in this method so that Keycloak returns a token, thus logging the user in the application. The second parameter (`redirect_uri`) must be passed so that when a token is made available, Keycloak redirects to the url informed.
@@ -1,3 +1,3 @@
1
1
  module Keycloak
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
@@ -492,6 +492,10 @@ module Keycloak
492
492
  generic_get("users/#{id}/role-mappings/clients/#{client}", nil, access_token)
493
493
  end
494
494
 
495
+ def self.list_offline_session(client_id, access_token)
496
+ generic_get("clients/#{client_id}/offline-sessions", nil, access_token)
497
+ end
498
+
495
499
  def self.update_effective_user_roles(id, client_id, roles_names, access_token = nil)
496
500
  client = JSON get_clients({ clientId: client_id }, access_token)
497
501
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqsc-keycloak-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Portugues
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-12-24 00:00:00.000000000 Z
12
+ date: 2019-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler