コード例 #1
0
ファイル: endpoint.py プロジェクト: expedier/yoti-python-sdk
    def get_dynamic_share_request_url(self, no_params=False):
        if no_params:
            return "/qrcodes/apps/{appid}".format(appid=self.sdk_id)

        return "/qrcodes/apps/{appid}?nonce={nonce}&timestamp={timestamp}".format(
            appid=self.sdk_id,
            nonce=create_nonce(),
            timestamp=create_timestamp())
コード例 #2
0
ファイル: endpoint.py プロジェクト: expedier/yoti-python-sdk
    def get_activity_details_request_path(self,
                                          decrypted_request_token,
                                          no_params=False):
        if no_params:
            return "/profile/{0}".format(decrypted_request_token)

        return "/profile/{0}?nonce={1}&timestamp={2}&appId={3}".format(
            decrypted_request_token, create_nonce(), create_timestamp(),
            self.sdk_id)
コード例 #3
0
    def __append_query_params(self, query_params=None):
        """
        Appends supplied query params in a dict to default query params.
        Returns a url encoded query param string
        """
        required = {"nonce": create_nonce(), "timestamp": create_timestamp()}

        query_params = self.__merge_dictionary(query_params, required)
        return "?{}".format(urlencode(query_params))
コード例 #4
0
ファイル: endpoint.py プロジェクト: expedier/yoti-python-sdk
    def get_aml_request_url(self, no_params=False):
        if no_params:
            return "/aml-check"

        return "/aml-check?appId={0}&timestamp={1}&nonce={2}".format(
            self.sdk_id, create_timestamp(), create_nonce())
コード例 #5
0
 def get_sandbox_path(self):
     return "/apps/{sdk_id}/tokens?timestamp={timestamp}&nonce={nonce}".format(
         sdk_id=self.sdk_id,
         nonce=create_nonce(),
         timestamp=create_timestamp())