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 +4 -4
- data/.github/workflows/release.yml +26 -0
- data/Dockerfile.release +11 -0
- data/Gemfile.lock +1 -1
- data/lib/hydra/keycloak/token.rb +9 -8
- data/lib/hydra/keycloak/version.rb +1 -1
- data/release.sh +9 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e44c13e82949716bb5f91393dab600335b8c5d201065edff00b286084f15399d
|
4
|
+
data.tar.gz: 23662cc9f3ffdd48f77c1d05baeff95ea72af6681a5813cd46f22d155c532b1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/Dockerfile.release
ADDED
data/Gemfile.lock
CHANGED
data/lib/hydra/keycloak/token.rb
CHANGED
@@ -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
|
-
:
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
23
|
+
[*REGISTERED_CLAIMS, *PUBLIC_CLAIMS, *PRIVATE_CLAIMS].each do |field|
|
23
24
|
define_method(field) do
|
24
25
|
@data.fetch(field)
|
25
26
|
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.
|
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-
|
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: []
|