hydra-keycloak-client 0.1.14 → 0.1.15

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: 0df63eb8a97b5a549f867fa0de5fe449c9791ca811195c1aba5610fb54a278e6
4
- data.tar.gz: 05d90289f5a8dce6618664a44ba1e7f0b1cd4d901b09895d52b43ef7fac8666c
3
+ metadata.gz: e44c13e82949716bb5f91393dab600335b8c5d201065edff00b286084f15399d
4
+ data.tar.gz: 23662cc9f3ffdd48f77c1d05baeff95ea72af6681a5813cd46f22d155c532b1d
5
5
  SHA512:
6
- metadata.gz: e00caef745d78165d825b25a69b7afcb578dda19e9bccd543a56c3640ad5be1f9d70e402d977d38594821c4d2a9a988f32dec05cdc5748dcdf58b834b090afbe
7
- data.tar.gz: 919a92716cbf26f5e8f94b973fe5023d350c298bd541caa50e81d4ec824b59c789fd0fa52480d65e9c98e8405d92317b19090467102815725abbc62c42ba99cd
6
+ metadata.gz: b9fb3fe92fc2c065ff622a5dcbea04541a94c2f9bb0bac1a3d0b7f34af058f1801869a068d8720937fbd38cb349fc3b4a707a72c7a9a43f0763aa74c3fe5fd33
7
+ data.tar.gz: 0e5ec4ae6acfd1f9ca880f24741077cff808cd9a3d1ffdb1bc27c6db801f6b3d5c36864729401827d7918d341d5d3033e2ed2fe37e226cdc5f1a6522687aebf5
@@ -0,0 +1,26 @@
1
+ name: Create release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+
8
+ jobs:
9
+ deploy:
10
+ runs-on: self-hosted
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+
15
+ - name: Set env
16
+ run: echo "RELEASE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
17
+
18
+ - name: Build releaser image
19
+ run: docker build -f Dockerfile.release -t hkc:release .
20
+
21
+ - name: Release gem
22
+ run: |
23
+ docker run --rm --name hkc_release \
24
+ -e RUBYGEMS_TOKEN=${{ secrets.RUBYGEMS_TOKEN }} \
25
+ -e RELEASE_VERSION=${{ env.RELEASE_VERSION }} \
26
+ hkc:release
@@ -0,0 +1,11 @@
1
+ FROM ruby:2.7.4
2
+
3
+ COPY . /app
4
+
5
+ WORKDIR /app
6
+
7
+ RUN chmod +x ./release.sh
8
+
9
+ RUN bundle install
10
+
11
+ ENTRYPOINT ["./release.sh"]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hydra-keycloak-client (0.1.14)
4
+ hydra-keycloak-client (0.1.15)
5
5
  dry-auto_inject
6
6
  dry-container
7
7
  dry-monads
@@ -5,21 +5,22 @@ require 'jwt'
5
5
  module Hydra
6
6
  module Keycloak
7
7
  class Token
8
+ REGISTERED_CLAIMS = %i[iss sub aud exp nbf iat jti].freeze
9
+ PUBLIC_CLAIMS = %i[auth_time scope].freeze
10
+ PRIVATE_CLAIMS = %i[session_state resource_access].freeze
11
+
8
12
  attr_reader :source,
9
- :exp,
10
- :iat,
11
- :auth_time,
12
- :iss,
13
- :session_state,
14
- :scope,
15
- :jti
13
+ :data,
14
+ *REGISTERED_CLAIMS,
15
+ *PUBLIC_CLAIMS,
16
+ *PRIVATE_CLAIMS
16
17
 
17
18
  def initialize(source)
18
19
  @source = source
19
20
  @data = ::JWT.decode(source, nil, false).first.transform_keys(&:to_sym)
20
21
  end
21
22
 
22
- %i[exp iat auth_time iss session_state scope jti].each do |field|
23
+ [*REGISTERED_CLAIMS, *PUBLIC_CLAIMS, *PRIVATE_CLAIMS].each do |field|
23
24
  define_method(field) do
24
25
  @data.fetch(field)
25
26
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Hydra
4
4
  module Keycloak
5
- VERSION = '0.1.14'
5
+ VERSION = '0.1.15'
6
6
  end
7
7
  end
data/release.sh ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bash
2
+
3
+ mkdir -p $HOME/.gem
4
+ touch $HOME/.gem/credentials
5
+ chmod 0600 $HOME/.gem/credentials
6
+ printf -- "---\n:rubygems_api_key: $RUBYGEMS_TOKEN\n" > $HOME/.gem/credentials
7
+
8
+ gem build hydra-keycloak-client.gemspec
9
+ gem push hydra-keycloak-client-$RELEASE_VERSION.gem
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-keycloak-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fedor Kosolapov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-08 00:00:00.000000000 Z
11
+ date: 2022-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -104,9 +104,11 @@ extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
106
  - ".github/workflows/main.yml"
107
+ - ".github/workflows/release.yml"
107
108
  - ".gitignore"
108
109
  - ".rspec"
109
110
  - ".rubocop.yml"
111
+ - Dockerfile.release
110
112
  - Dockerfile.test
111
113
  - Gemfile
112
114
  - Gemfile.lock
@@ -128,6 +130,7 @@ files:
128
130
  - lib/hydra/keycloak/tokens/repo.rb
129
131
  - lib/hydra/keycloak/urls.rb
130
132
  - lib/hydra/keycloak/version.rb
133
+ - release.sh
131
134
  - run_tests.sh
132
135
  homepage: https://github.com/hydra-billing/hydra-keycloak-client
133
136
  licenses: []