8000 Update docs · srevenant/twilio-python@d98bc2f · GitHub
[go: up one dir, main page]

Skip to content

Commit d98bc2f

Browse files
committed
Update docs
1 parent a22f04d commit d98bc2f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

twilio/access_token.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55
class IpMessagingGrant(object):
6+
""" Grant to access Twilio IP Messaging """
67
def __init__(self, service_sid=None, endpoint_id=None,
78
role_sid=None, credential_sid=None):
89
self.service_sid = service_sid
@@ -29,6 +30,7 @@ def to_payload(self):
2930

3031

3132
class ConversationsGrant(object):
33+
""" Grant to access Twilio Conversations """
3234
def __init__(self, configuration_profile_sid=None):
3335
self.configuration_profile_sid = configuration_profile_sid
3436

@@ -45,6 +47,7 @@ def to_payload(self):
4547

4648

4749
class AccessToken(object):
50+
""" Access Token used to access Twilio Resources """
4851
def __init__(self, account_sid, signing_key_sid, secret,
4952
identity=None, ttl=3600):
5053
self.account_sid = account_sid
@@ -81,7 +84,8 @@ def to_jwt(self, algorithm='HS256'):
8184
"grants": grants
8285
}
8386

84-
return jwt.encode(payload, self.secret, headers=headers)
87+
return jwt.encode(payload, self.secret, headers=headers,
88+
algorithm=algorithm)
8589

8690
def __str__(self):
8791
return self.to_jwt().decode('utf-8')

0 commit comments

Comments
 (0)
0