Class: Layer::IdentityToken
- Inherits:
-
Object
- Object
- Layer::IdentityToken
- Defined in:
- lib/layer/identity_token.rb
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#nonce ⇒ Object
readonly
Returns the value of attribute nonce.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ IdentityToken
constructor
A new instance of IdentityToken.
- #layer_key_id ⇒ Object
- #layer_provider_id ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ IdentityToken
Returns a new instance of IdentityToken.
5 6 7 8 9 |
# File 'lib/layer/identity_token.rb', line 5 def initialize( = {}) @user_id = [:user_id] @nonce = [:nonce] @expires_at = ([:expires_at] || Time.now+(1209600)) end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
3 4 5 |
# File 'lib/layer/identity_token.rb', line 3 def expires_at @expires_at end |
#nonce ⇒ Object (readonly)
Returns the value of attribute nonce.
3 4 5 |
# File 'lib/layer/identity_token.rb', line 3 def nonce @nonce end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
3 4 5 |
# File 'lib/layer/identity_token.rb', line 3 def user_id @user_id end |
Instance Method Details
#layer_key_id ⇒ Object
15 16 17 |
# File 'lib/layer/identity_token.rb', line 15 def layer_key_id ENV['LAYER_KEY_ID'] end |
#layer_provider_id ⇒ Object
19 20 21 |
# File 'lib/layer/identity_token.rb', line 19 def layer_provider_id ENV['LAYER_PROVIDER_ID'] end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/layer/identity_token.rb', line 11 def to_s get_jwt end |