Class: Twilio::JWT::ClientCapability
- Defined in:
- lib/twilio-ruby/jwt/client_capability.rb
Defined Under Namespace
Classes: EventStreamScope, IncomingClientScope, OutgoingClientScope
Instance Attribute Summary collapse
-
#account_sid ⇒ Object
Returns the value of attribute account_sid.
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#client_name ⇒ Object
Returns the value of attribute client_name.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
Instance Method Summary collapse
- #add_scope(scope) ⇒ Object
-
#initialize(account_sid, auth_token, scopes: [], nbf: nil, ttl: 3600, valid_until: nil) ⇒ ClientCapability
constructor
A new instance of ClientCapability.
Methods inherited from BaseJWT
#_generate_headers, #headers, #payload, #to_jwt
Constructor Details
#initialize(account_sid, auth_token, scopes: [], nbf: nil, ttl: 3600, valid_until: nil) ⇒ ClientCapability
Returns a new instance of ClientCapability.
17 18 19 20 21 22 23 |
# File 'lib/twilio-ruby/jwt/client_capability.rb', line 17 def initialize(account_sid, auth_token, scopes: [], nbf: nil, ttl: 3600, valid_until: nil) super(secret_key: auth_token, issuer: account_sid, nbf: nbf, ttl: ttl, valid_until: valid_until) @account_sid = account_sid @auth_token = auth_token @client_name = nil @scopes = scopes end |
Instance Attribute Details
#account_sid ⇒ Object
Returns the value of attribute account_sid.
12 13 14 |
# File 'lib/twilio-ruby/jwt/client_capability.rb', line 12 def account_sid @account_sid end |
#auth_token ⇒ Object
Returns the value of attribute auth_token.
12 13 14 |
# File 'lib/twilio-ruby/jwt/client_capability.rb', line 12 def auth_token @auth_token end |
#client_name ⇒ Object
Returns the value of attribute client_name.
12 13 14 |
# File 'lib/twilio-ruby/jwt/client_capability.rb', line 12 def client_name @client_name end |
#scopes ⇒ Object
Returns the value of attribute scopes.
12 13 14 |
# File 'lib/twilio-ruby/jwt/client_capability.rb', line 12 def scopes @scopes end |
Instance Method Details
#add_scope(scope) ⇒ Object
25 26 27 |
# File 'lib/twilio-ruby/jwt/client_capability.rb', line 25 def add_scope(scope) @scopes.push(scope) end |