Class: Twilio::JWT::ClientCapability

Inherits:
BaseJWT
  • Object
show all
Defined in:
lib/twilio-ruby/jwt/client_capability.rb

Defined Under Namespace

Classes: EventStreamScope, IncomingClientScope, OutgoingClientScope

Instance Attribute Summary collapse

Instance Method Summary collapse

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(, auth_token, scopes: [], nbf: nil, ttl: 3600, valid_until: nil)
  super(secret_key: auth_token, issuer: , nbf: nbf, ttl: ttl, valid_until: valid_until)
  @account_sid = 
  @auth_token = auth_token
  @client_name = nil
  @scopes = scopes
end

Instance Attribute Details

#account_sidObject

Returns the value of attribute account_sid.



12
13
14
# File 'lib/twilio-ruby/jwt/client_capability.rb', line 12

def 
  @account_sid
end

#auth_tokenObject

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_nameObject

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

#scopesObject

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