Class: Compeon::Token::Access
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#role ⇒ Object
Returns the value of attribute role.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Attributes inherited from Base
#audience, #expires_at, #issued_at, #issuer, #not_before, #subject
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client_id:, role:, user_id:, **claims) ⇒ Access
constructor
A new instance of Access.
Methods inherited from Base
attributes, #attributes_valid?, decode, #encode, #expires_at_valid?, #registered_claims, registered_claims_mapping, #valid?
Constructor Details
#initialize(client_id:, role:, user_id:, **claims) ⇒ Access
Returns a new instance of Access.
26 27 28 29 30 31 |
# File 'lib/compeon/token/access.rb', line 26 def initialize(client_id:, role:, user_id:, **claims) super(claims) @client_id = client_id @role = role @user_id = user_id end |
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
24 25 26 |
# File 'lib/compeon/token/access.rb', line 24 def client_id @client_id end |
#role ⇒ Object
Returns the value of attribute role.
24 25 26 |
# File 'lib/compeon/token/access.rb', line 24 def role @role end |
#user_id ⇒ Object
Returns the value of attribute user_id.
24 25 26 |
# File 'lib/compeon/token/access.rb', line 24 def user_id @user_id end |
Class Method Details
.attributes_mapping ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/compeon/token/access.rb', line 7 def attributes_mapping { client_id: :cid, role: :role, user_id: :uid }.freeze end |
.jwt_algorithm ⇒ Object
15 16 17 |
# File 'lib/compeon/token/access.rb', line 15 def jwt_algorithm 'RS256' end |
.kind ⇒ Object
19 20 21 |
# File 'lib/compeon/token/access.rb', line 19 def kind 'access' end |