Class: Apnotic::ProviderToken
- Inherits:
-
Object
- Object
- Apnotic::ProviderToken
- Defined in:
- lib/apnotic/provider_token.rb
Instance Method Summary collapse
-
#initialize(key, team_id, key_id) ⇒ ProviderToken
constructor
A new instance of ProviderToken.
- #token ⇒ Object
Constructor Details
#initialize(key, team_id, key_id) ⇒ ProviderToken
Returns a new instance of ProviderToken.
7 8 9 10 11 |
# File 'lib/apnotic/provider_token.rb', line 7 def initialize(key, team_id, key_id) @key = OpenSSL::PKey::EC.new(key) @team_id = team_id @key_id = key_id end |
Instance Method Details
#token ⇒ Object
13 14 15 |
# File 'lib/apnotic/provider_token.rb', line 13 def token [encode(header), encode(payload), encode(signature)].join(".") end |