Class: Twilio::JWT::AccessToken::ChatGrant

Inherits:
Object
  • Object
show all
Includes:
Twilio::JWT::AccessTokenGrant
Defined in:
lib/twilio-ruby/jwt/access_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#deployment_role_sidObject

Returns the value of attribute deployment_role_sid.



89
90
91
# File 'lib/twilio-ruby/jwt/access_token.rb', line 89

def deployment_role_sid
  @deployment_role_sid
end

#endpoint_idObject

Returns the value of attribute endpoint_id.



89
90
91
# File 'lib/twilio-ruby/jwt/access_token.rb', line 89

def endpoint_id
  @endpoint_id
end

#push_credential_sidObject

Returns the value of attribute push_credential_sid.



89
90
91
# File 'lib/twilio-ruby/jwt/access_token.rb', line 89

def push_credential_sid
  @push_credential_sid
end

#service_sidObject

Returns the value of attribute service_sid.



89
90
91
# File 'lib/twilio-ruby/jwt/access_token.rb', line 89

def service_sid
  @service_sid
end

Instance Method Details

#_generate_payloadObject



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/twilio-ruby/jwt/access_token.rb', line 98

def _generate_payload
  payload = {}

  payload[:service_sid] = service_sid if service_sid

  payload[:endpoint_id] = endpoint_id if endpoint_id

  if deployment_role_sid
    payload[:deployment_role_sid] = deployment_role_sid
  end

  if push_credential_sid
    payload[:push_credential_sid] = push_credential_sid
  end

  payload
end

#_keyObject



94
95
96
# File 'lib/twilio-ruby/jwt/access_token.rb', line 94

def _key
  'chat'
end