Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#don't commit the properties file for tests
test.properties

*.class

# Package Files #
*.jar
*.war
*.ear
*.swp
19 changes: 19 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2012 TeleSign Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 0 additions & 4 deletions README.md

This file was deleted.

117 changes: 117 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
========
TeleSign
========

:Info:
For more information, visit the `TeleSign web site <http://www.TeleSign.com>`_.
For the latest source code, visit the `TeleSign github repository <http://github.com/TeleSign/java_telesign/tree>`_.

:Author:
Telesign Corp.

---------------------------------
TeleSign Web Services: Java SDK
---------------------------------

**TeleSign Web Services** conform to the `REST Web Service Design Model <http://en.wikipedia.org/wiki/Representational_state_transfer>`_. Services are exposed as URI-addressable resources through the set of *RESTful* procedures in our **TeleSign REST API**.

The **TeleSign Java SDK** is a Java library that provides an interface to `TeleSign Web Services <http://www.telesign.com/products-demos/>`_.

Authentication
--------------

**You will need a Customer ID and API Key in order to use TeleSign’s REST API**. If you are already a customer and need an API Key, you can generate one in the `Client Portal <https://portal.telesign.com>`_. If you are not a customer and would like to get an API Key, please contact `support@telesign.com <mailto:support@telesign.com>`_

You supply your credentials to the API by passing them in during class initialization.

>>>
String customer_id = "CUSTOMER_ID_GOES_HERE";
String secret_key = "SECRECT_KEY_GOES_HERE";
Verify verify = new Verify(customer_id, secret_key);

The Java Classes
------------------

With just two classes, **telesign.api** abstracts much of the complexity of the TeleSign REST API.

+------------------------------+--------------------------------------------------------------------------+
| Java Class | Description |
+==============================+==========================================================================+
| com.telesign.phoneid.PhoneId | The **PhoneId** class exposes three services that each provide |
| | information about a specified phone number. |
| | |
| | *standard* |
| | Retrieves the standard set of details about the specified phone |
| | number. This includes the type of phone (e.g., land line or mobile), |
| | and it's approximate geographic location. |
| | *score* |
| | Retrieves a score for the specified phone number. This ranks the |
| | phone number's "risk level" on a scale from 0 to 1000, so you can |
| | code your web application to handle particular use cases (e.g., to |
| | stop things like chargebacks, identity theft, fraud, and spam). |
| | *contact* |
| | In addition to the information retrieved by *standard*, this service |
| | provides the Name & Address associated with the specified phone |
| | number. |
| | *live* |
| | In addition to the information retrieved by *standard*, this |
| | service provides actionable data associated with the specified phone |
| | number. |
| | |
+------------------------------+--------------------------------------------------------------------------+
| com.telesign.verify.Verify | The **Verify** class exposes two services for sending users a |
| | verification token (a three to five-digit number). You can use this |
| | mechanism to simply test whether you can reach users at the phone number |
| | they supplied, or you can have them use the token to authenticate |
| | themselves with your web application. In addition, this class also |
| | exposes a service that allows you to confirm the result of the |
| | authentication. |
| | |
| | You can use this verification factor in combination with *username* |
| | & *password* to provide *two-factor* authentication for higher |
| | security. |
| | |
| | *call* |
| | Calls the specified phone number, and using speech synthesis—speaks |
| | the verification code to the user. |
| | *sms* |
| | Send a text message containing the verification code to the |
| | specified phone number (supported for mobile phones only). |
| | *status* |
| | Retrieves the verification result. You make this call in your web |
| | application after users complete the authentication transaction |
| | (using either a *call* or *sms*). |
| | |
+------------------------------+--------------------------------------------------------------------------+

Java Code Example: To Verify a Call
-------------------------------------

Here's a basic code example.

>>>
String customer_id = "CUSTOMER_ID_GOES_HERE";
String secret_key = "SECRECT_KEY_GOES_HERE";
Verify verify = new Verify(customer_id, secret_key);
VerifyResponse ret = verify.call("13103409700");

{"reference_id":"013C8CC050DF040BE4D412D700002101","resource_uri":"/v1/verify/013C8CC050DF040BE4D412D700002101","sub_resource":"call","errors":[],"status":{"updated_on":"2013-01-30T18:37:59.444100Z","code":103,"description":"Call in progress"},"verify":{"code_state":"UNKNOWN","code_entered":""}}

Documentation
-------------

Detailed documentation for TeleSign™ REST APIs is available in the
`Client Portal <https://portal.telesign.com>`_

Testing
-------

The easiest way to run the tests is to install `junit
<http://junit.org/>`_ Tests are located in the *test/* directory.

Support and Feedback
--------------------

For more information about the Phone Verify and PhoneID Standard services, please contact your TeleSign representative:

Email: `support@telesign.com <mailto:support@telesign.com>`_
72 changes: 72 additions & 0 deletions doc/allclasses-frame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_15) on Sat Mar 02 19:13:31 PST 2013 -->
<title>All Classes</title>
<meta name="date" content="2013-03-02">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<h1 class="bar">All Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="com/telesign/util/AuthMethod.html" title="enum in com.telesign.util" target="classFrame">AuthMethod</a></li>
<li><a href="com/telesign/phoneid/PhoneId.html" title="class in com.telesign.phoneid" target="classFrame">PhoneId</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Contact.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Contact</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Error.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Error</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Location.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Location</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Location.Coordinates.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Location.Coordinates</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Location.Country.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Location.Country</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Location.TimeZone.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Location.TimeZone</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Numbering.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Numbering</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Numbering.CleansingNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Numbering.CleansingNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Numbering.CleansingNumber.Number.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Numbering.CleansingNumber.Number</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Numbering.OriginalNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Numbering.OriginalNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.PhoneType.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.PhoneType</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdContactResponse.Status.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdContactResponse.Status</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Error.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Error</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Live.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Live</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Location.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Location</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Location.Coordinates.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Location.Coordinates</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Location.Country.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Location.Country</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Location.TimeZone.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Location.TimeZone</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Numbering.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Numbering</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Numbering.CleansingNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Numbering.CleansingNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Numbering.CleansingNumber.Number.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Numbering.CleansingNumber.Number</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Numbering.OriginalNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Numbering.OriginalNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.PhoneType.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.PhoneType</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdLiveResponse.Status.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdLiveResponse.Status</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.Error.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.Error</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.Numbering.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.Numbering</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.Numbering.CleansingNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.Numbering.CleansingNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.Numbering.CleansingNumber.Number.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.Numbering.CleansingNumber.Number</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.Numbering.OriginalNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.Numbering.OriginalNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.PhoneType.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.PhoneType</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.Risk.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.Risk</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdScoreResponse.Status.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdScoreResponse.Status</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Error.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Error</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Location.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Location</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Location.Coordinates.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Location.Coordinates</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Location.Country.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Location.Country</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Location.TimeZone.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Location.TimeZone</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Numbering.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Numbering</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Numbering.CleansingNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Numbering.CleansingNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Numbering.CleansingNumber.Number.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Numbering.CleansingNumber.Number</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Numbering.OriginalNumber.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Numbering.OriginalNumber</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.PhoneType.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.PhoneType</a></li>
<li><a href="com/telesign/phoneid/response/PhoneIdStandardResponse.Status.html" title="class in com.telesign.phoneid.response" target="classFrame">PhoneIdStandardResponse.Status</a></li>
<li><a href="com/telesign/util/TeleSignRequest.html" title="class in com.telesign.util" target="classFrame">TeleSignRequest</a></li>
<li><a href="com/telesign/verify/Verify.html" title="class in com.telesign.verify" target="classFrame">Verify</a></li>
<li><a href="com/telesign/verify/response/VerifyResponse.html" title="class in com.telesign.verify.response" target="classFrame">VerifyResponse</a></li>
<li><a href="com/telesign/verify/response/VerifyResponse.Error.html" title="class in com.telesign.verify.response" target="classFrame">VerifyResponse.Error</a></li>
<li><a href="com/telesign/verify/response/VerifyResponse.Status.html" title="class in com.telesign.verify.response" target="classFrame">VerifyResponse.Status</a></li>
<li><a href="com/telesign/verify/response/VerifyResponse.Verify.html" title="class in com.telesign.verify.response" target="classFrame">VerifyResponse.Verify</a></li>
</ul>
</div>
</body>
</html>
Loading