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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 677c08c639b3df8da3ed5b16383cc0272d5de8df5a17a8c6b40c7544515d89cd
4
- data.tar.gz: 9667f02115b454d657e132efc239c6fe523d2e2044e3ed72d835187ab11f6e00
3
+ metadata.gz: 6983780b3dd8b77cb0625de0b7812accb5956f44ed1d15eb8eb423891386cf36
4
+ data.tar.gz: da791faa7f1f7dbf696f54b318b2e387f9dad992d274909f1eb72bd821c1d018
5
5
  SHA512:
6
- metadata.gz: 3df998d200b56dc1dd3faefdff3f64bd36543cde9fe79dc96421341e6db33d2d81e44a85c7bcd4ccbfb18918f700f60278c52f15b6e4ed08ea3fc5cbd26edc21
7
- data.tar.gz: 39242ec2c5078a53c7fd1b20e164ca0cbff94b8067c657226d0adf12448d278da457671b0ef211a7309cf8951b6d2f5dc18c16e4ee24b7c878fdb1bb10787970
6
+ metadata.gz: 1f1b59bbb88834bdf8aacba6fa6562d043d61482ef4daefbd02850feff477eda56a691e7c8e4e4915ad3e7b13829eefa0fb302d3b404e2673187e4c892ef6502
7
+ data.tar.gz: '081fee116c14df463e14a721573c12205a401997b5a4f2043a4080a23ecb8e629cba77ab8b6f78bd8fb9bec6df05b81a674420b68571f3996ea5bb785e46ed1b'
data/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # libkeycloak Ruby bindings
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/libkeycloak.svg)](https://badge.fury.io/rb/libkeycloak)
4
+
5
+ - [documentation](https://www.rubydoc.info/gems/libkeycloak/1.0.1)
@@ -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, options: 0)
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, options)
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.1
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-16 00:00:00.000000000 Z
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
- - keycloak.rb
55
+ - README.md
56
+ - lib/libkeycloak.rb
56
57
  homepage: https://github.com/Jomy10/libkeycloak
57
58
  licenses:
58
59
  - MIT