Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
16 changes: 16 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="libs/org.apache.commons.codec/commons-codec-1.7.jar" sourcepath="libs/org.apache.commons.codec/commons-codec-1.7-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/java_telesign/libs/org.apache.commons.codec/commons-codec-1.7-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="libs/com.google.gson/gson-2.2.2.jar" sourcepath="libs/com.google.gson/gson-2.2.2-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/java_telesign/libs/com.google.gson/gson-2.2.2-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
23 changes: 18 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
*.class
# Build & Release Folders.
bin/
doc/

# Package Files #
*.jar
*.war
*.ear
# Package Files
.war
.ear
.swp

# Compiled Java files.
.class

# Experimental Bits
# The output from an XML Doclet.
jel/

# Properties File for Tests
test.properties
/javadoc.xml
18 changes: 18 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>java_telesign</name>
<comment></comment>
<projects>
<project>python_rest_api</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
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>`_
7 changes: 7 additions & 0 deletions ant.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bin-dir=bin
doc-dir=doc
jel-dir=jel
lib-dir=libs
src-dir=src
test-dir=test
javadoc-access=public
21 changes: 21 additions & 0 deletions bin/com/telesign/phoneid/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<body>
<p>
Contains the PhoneId class, which abstracts calls to the TeleSign PhoneID Web Service.
</p>
<p>
The PhoneID web service retrieves information about a specified phone number. This includes the it's:
</p>
<ul>
<li>Type,</li>
<li>Numbering Structure,</li>
<li>Cleansing Details, and</li>
<li>Location.</li>
</ul>
<p>
Using this service, you can decide what types of phone numbers to accept from users,
or determine whether the numbers that users submit coincide with the address information provided.
</p>
</body>
</html>
8 changes: 8 additions & 0 deletions bin/com/telesign/phoneid/response/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<body>
<p>
Contains a set of classes that represent TeleSign server response objects�one for each of the PhoneID web services.
</p>
</body>
</html>
8 changes: 8 additions & 0 deletions bin/com/telesign/util/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<body>
<p>
Contains the base class for the TeleSign service request object, and an enumeration that contains the set of supported encryption algorithms used for credentialed-access to our web services.
</p>
</body>
</html>
13 changes: 13 additions & 0 deletions bin/com/telesign/verify/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<body>
<p>
Contains the Verify class, which abstracts calls to the TeleSign Verify Web Service.
</p>
<p>
The Phone Verify web service provides an identity verification solution that uses the telephone to deliver a one-time validation code to your end users.
Upon receiving this code, your users just type it into their computer and send it back to you (or to us if they dial it into their phone).
The validity of their identity is then determined by simply comparing the codes they return to the ones we send them�and a match is considered positive identification.
</p>
</body>
</html>
8 changes: 8 additions & 0 deletions bin/com/telesign/verify/response/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<body>
<p>
Contains a class that represents the TeleSign server response object for the Phone Verify web service.
</p>
</body>
</html>
34 changes: 34 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="TeleSign Java SDK" default="HTML Docs" basedir=".">
<target name="init" description="--> Setup environment variables for building this project.">
<property name="${eclipse.home}" location="/home/eclipse" />
</target>
<target name="HTML Docs" depends="init" description="--> Compile the HTML version of the doc set.">
<property name="javadoc.header" value="&lt;strong&gt;TeleSign Java SDK&lt;/strong&gt;&#09;v1.0" />
<property name="javadoc.footer" value="&lt;strong&gt;DocBuild:&lt;/strong&gt;&#09;&lt;script&gt; var tStamp=new Date(); document.write(tStamp.toUTCString()); &lt;/script&gt;" />
<property name="javadoc.bottom" value='Copyright &amp;copy; 2012 - &lt;script&gt; var currYear=new Date(); document.write(currYear.getFullYear()); &lt;/script&gt;, TeleSign Corp., All rights reserved.' />
<javadoc access="private"
additionalparam=" -noqualifier java.lang:java.io "
author="true"
classpath="${basedir}/libs/org.apache.commons.codec/commons-codec-1.7.jar;${basedir}/libs/com.google.gson/gson-2.2.2.jar"
destdir="${basedir}/doc"
doctitle="TeleSign Java SDK Documentation"
nodeprecated="true"
nodeprecatedlist="true"
noindex="false"
nonavbar="false"
notree="false"
overview="${basedir}/overview.html"
packagenames="com.telesign.verify,com.telesign.util,com.telesign.verify.response,com.telesign.phoneid,com.telesign.phoneid.response"
source="1.7.0"
sourcepath="${basedir}/src"
splitindex="true"
use="true"
version="true">
<link href="http://download.oracle.com/javase/7/docs/api/"/>
<header><![CDATA[${javadoc.header}]]></header>
<footer><![CDATA[${javadoc.footer}]]></footer>
<bottom><![CDATA[${javadoc.bottom}]]></bottom>
</javadoc>
</target>
</project>
Loading