Skip to content

Commit

Permalink
Updating TBA Token to HMA-SHA256, since HMA-SHA1 is being depricated
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwetabhk committed Nov 25, 2020
1 parent b0f0918 commit 85b5c82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions netsuitesdk/internal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .netsuite_types import *
from .utils import PaginatedSearch


class NetSuiteClient:
"""The Netsuite client class providing access to the Netsuite
SOAP/WSDL web service"""
Expand All @@ -40,7 +41,6 @@ class NetSuiteClient:
_token_secret = None
_app_id = None


def __init__(self, account=None, caching=True, caching_timeout=2592000):
"""
Initialize the Zeep SOAP client, parse the xsd specifications
Expand Down Expand Up @@ -247,8 +247,7 @@ def compute_nonce(length=20):
return self.TokenPassport(account=self._account, consumerKey=self._consumer_key, token=self._token_key,
nonce=nonce, timestamp=timestamp, signature=signature)


def connect_tba(self, consumer_key, consumer_secret, token_key, token_secret, signature_algorithm='HMAC-SHA1'):
def connect_tba(self, consumer_key, consumer_secret, token_key, token_secret, signature_algorithm='HMAC-SHA256'):
"""
Create a TokenPassport object holding credentials for Token based
authentication which will be passed to NetSuiteClient.login
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='netsuitesdk',
version='1.11.0',
version='1.12.0',
author='Siva Narayanan',
author_email='siva@fyle.in',
description='Python SDK for accessing the NetSuite SOAP webservice',
Expand Down

0 comments on commit 85b5c82

Please sign in to comment.