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 +4 -4
- data/Gemfile.lock +2 -2
- data/lib/compeon/access_token/version.rb +1 -1
- data/lib/compeon/token.rb +1 -0
- data/lib/compeon/token/authorization.rb +34 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b12f8bb5c16b4891a0e6965764cda7c5cff5a0e17e10410505d0b095c9d54e16
|
4
|
+
data.tar.gz: c3fa80b943ffe72cd34ffc143769b532f58831d8f41b74ea36c0aaf8cd7d5c72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b02daea1ac24143ad340093381cce454cb7effdff4784a7d12ce86464d2ea6fb7fb4c8a4268c184661e7650b1a64416a2d1a060956aba1cf9d6bdd41d251fac
|
7
|
+
data.tar.gz: d398cac5341d3aad4d1b2044f745fba5ed446823fdf43c603d4d34303618d53db652fa5642831804eed3b1c774fc27cea810540c39df992c738519c59120b5b7
|
data/Gemfile.lock
CHANGED
data/lib/compeon/token.rb
CHANGED
@@ -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.
|
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-
|
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
|