compeon-access_token 0.2.0 → 0.2.1

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: faae0c48728f4b0d7eb662200b67810cc8ebd96dc6966e1facf87382250fa224
4
- data.tar.gz: a598675a7e638cb3d0dfc40e2f22fecd172699d0ab4c49fffd3a06e95e4ddb54
3
+ metadata.gz: b12f8bb5c16b4891a0e6965764cda7c5cff5a0e17e10410505d0b095c9d54e16
4
+ data.tar.gz: c3fa80b943ffe72cd34ffc143769b532f58831d8f41b74ea36c0aaf8cd7d5c72
5
5
  SHA512:
6
- metadata.gz: cec38a83ded44a217f7c399e24ea8a64de86bb1cbd5d54a65786dbb739d92fc8e5d24e3f8ff29a67bace1f4f71689dcd00a4625abc9d66add6343b3db4fb1306
7
- data.tar.gz: c7243383dd55edd5267b21a11b40357c24612411abd2b1a3014f711c52bd7cf605f68adb4d3b7b0959c1b96ed5918f68856327af3967ca959d96f95cbe2eea02
6
+ metadata.gz: 1b02daea1ac24143ad340093381cce454cb7effdff4784a7d12ce86464d2ea6fb7fb4c8a4268c184661e7650b1a64416a2d1a060956aba1cf9d6bdd41d251fac
7
+ data.tar.gz: d398cac5341d3aad4d1b2044f745fba5ed446823fdf43c603d4d34303618d53db652fa5642831804eed3b1c774fc27cea810540c39df992c738519c59120b5b7
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- compeon-access_token (0.1.0)
4
+ compeon-access_token (0.2.1)
5
5
  jwt (~> 2.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- jwt (2.1.0)
10
+ jwt (2.2.1)
11
11
  minitest (5.11.3)
12
12
  rake (10.5.0)
13
13
 
@@ -1,5 +1,5 @@
1
1
  module Compeon
2
2
  class AccessToken
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'compeon/token/base'
4
4
  require 'compeon/token/access'
5
+ require 'compeon/token/authorization'
5
6
  require 'compeon/token/decoder'
6
7
  require 'compeon/token/encoder'
7
8
 
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Compeon
4
+ module Token
5
+ class Authorization < Base
6
+ class << self
7
+ def attributes_mapping
8
+ {
9
+ client_id: :cid,
10
+ redirect_uri: :uri,
11
+ user_id: :uid
12
+ }.freeze
13
+ end
14
+
15
+ def jwt_algorithm
16
+ 'RS256'
17
+ end
18
+
19
+ def kind
20
+ 'auth'
21
+ end
22
+ end
23
+
24
+ attr_accessor :client_id, :redirect_uri, :user_id
25
+
26
+ def initialize(client_id:, redirect_uri:, user_id:, **claims)
27
+ super(claims)
28
+ @client_id = client_id
29
+ @redirect_uri = redirect_uri
30
+ @user_id = user_id
31
+ end
32
+ end
33
+ end
34
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compeon-access_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Schilling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-09 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -88,6 +88,7 @@ files:
88
88
  - lib/compeon/access_token/version.rb
89
89
  - lib/compeon/token.rb
90
90
  - lib/compeon/token/access.rb
91
+ - lib/compeon/token/authorization.rb
91
92
  - lib/compeon/token/base.rb
92
93
  - lib/compeon/token/decoder.rb
93
94
  - lib/compeon/token/encoder.rb