keycloak_rails 1.0.0.pre.beta.2 → 1.0.0.pre.beta.3

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: 3ab83f2bbc67c999f4575e3f9949d6569056144634463fc6d186309152343082
4
- data.tar.gz: 2fb463727955abda0b386031ac6a6b1444a4b5637cbee5dc64966fe5aa41cfe3
3
+ metadata.gz: 98a0ecf5db2abf6298d50a58478da3bdc91134c02444097faba3b2e010c558fd
4
+ data.tar.gz: 74ac6dd209b07faffae9aceeaea82cf499fdc16f9980f78cd0f1dc314d93ec64
5
5
  SHA512:
6
- metadata.gz: d4f85ee2ed8bbfef4022e24a47f1ac6a5e3d39ac6e89807e1362212e046259895d81ab15254cf14af2858677e618ef4a8ce53a6e7bd6bf544eaef2aafc835d16
7
- data.tar.gz: daac0698880760a92939ac6955d107ec1e5b3ad919d2c2b4e1f8e53d7dec7de95857a4dad5e1405b6763712a3e4c31623bbd4f5d0067c5f0c34b4f8badf8f773
6
+ metadata.gz: 7beab89686351e4e50bf9b01b4a110816bf0f66cca3467cfe1a597478b3e3b2e8559b980330a4cf51e83d9fcce080761542769fec3ceceb0ffd6297c4ab47872
7
+ data.tar.gz: 43ca92304b4f19843800a3d14fcaaef92042ea325be158129503f8fa543e5e94b8ecb5403554a2999bb55489f11580262978f821f7e64b167ecaf3f33df1f73c
@@ -17,6 +17,7 @@ module KeycloakRails
17
17
  raise StandardError, request[:response] unless request[:status] == :ok
18
18
 
19
19
  set_perm_password(email, password) unless password.nil? || password.empty?
20
+ request[:response]
20
21
  end
21
22
 
22
23
  def current_user_has_active_session?
@@ -30,7 +30,8 @@ module KeycloakRails
30
30
  tokens = keycloak_user.fetch_tokens(email: email, password: password)
31
31
  set_auth_cookies(tokens)
32
32
  end
33
- { sso_sub: keycloak_user.active_user_sub, email: email,
33
+ user_sub = keycloak_client.user_by_username(email)['id']
34
+ { sso_sub: user_sub, email: email,
34
35
  first_name: first_name, last_name: last_name }
35
36
  end
36
37
 
@@ -25,7 +25,8 @@ module KeycloakRails
25
25
 
26
26
  def redirect_to_app_root
27
27
  # redirect_back(fallback_location: root_path)
28
- redirect_to root_path
28
+
29
+ redirect_to root_path, status: 301
29
30
  end
30
31
  end
31
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KeycloakRails
4
- VERSION = '1.0.0-beta.2'
4
+ VERSION = '1.0.0-beta.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keycloak_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.2
4
+ version: 1.0.0.pre.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omar Luqman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-11 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable