libkeycloak 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/{keycloak.rb → lib/libkeycloak.rb} +9 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6983780b3dd8b77cb0625de0b7812accb5956f44ed1d15eb8eb423891386cf36
|
4
|
+
data.tar.gz: da791faa7f1f7dbf696f54b318b2e387f9dad992d274909f1eb72bd821c1d018
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f1b59bbb88834bdf8aacba6fa6562d043d61482ef4daefbd02850feff477eda56a691e7c8e4e4915ad3e7b13829eefa0fb302d3b404e2673187e4c892ef6502
|
7
|
+
data.tar.gz: '081fee116c14df463e14a721573c12205a401997b5a4f2043a4080a23ecb8e629cba77ab8b6f78bd8fb9bec6df05b81a674420b68571f3996ea5bb785e46ed1b'
|
data/README.md
ADDED
@@ -70,7 +70,6 @@ module Keycloak_FFI
|
|
70
70
|
attach_function :keycloak_create_client, [
|
71
71
|
KeycloakClient.ptr,
|
72
72
|
:string, # jsonstr
|
73
|
-
:char # options
|
74
73
|
], KeycloakError.val
|
75
74
|
|
76
75
|
attach_function :keycloak_destroy_client, [:pointer], :void
|
@@ -85,6 +84,13 @@ module Keycloak_FFI
|
|
85
84
|
self[:token]
|
86
85
|
end
|
87
86
|
|
87
|
+
def to_h
|
88
|
+
{
|
89
|
+
token: self[:token],
|
90
|
+
expiration: self[:expiration]
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
88
94
|
def expiration
|
89
95
|
self[:token]
|
90
96
|
end
|
@@ -345,10 +351,10 @@ module Keycloak
|
|
345
351
|
|
346
352
|
# TODO: try adding functions to ffi class
|
347
353
|
class Client
|
348
|
-
def initialize(json
|
354
|
+
def initialize(json)
|
349
355
|
client_ptr = FFI::LibC.malloc(Keycloak_FFI::KeycloakClient.size)
|
350
356
|
@ptr = Keycloak_FFI::KeycloakClient.new(client_ptr)
|
351
|
-
err = Keycloak_FFI.keycloak_create_client(@ptr, json
|
357
|
+
err = Keycloak_FFI.keycloak_create_client(@ptr, json)
|
352
358
|
if err[:errcode] != :OK
|
353
359
|
raise Keycloak::Error, err
|
354
360
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libkeycloak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Everaert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -52,7 +52,8 @@ executables: []
|
|
52
52
|
extensions: []
|
53
53
|
extra_rdoc_files: []
|
54
54
|
files:
|
55
|
-
-
|
55
|
+
- README.md
|
56
|
+
- lib/libkeycloak.rb
|
56
57
|
homepage: https://github.com/Jomy10/libkeycloak
|
57
58
|
licenses:
|
58
59
|
- MIT
|