In order to use the Virgil Infrastructure setup your client and implement the required mechanisms using the following guide.
Don't see your language? Virgil is also available as a REST API.
The Virgil SDK is provided as a set of packages named com.virgilsecurity.sdk. Packages are distributed via Maven repository.
- Java Development Kit (JDK) 7+
- Maven 3+
INSTALLING THE PACKAGE
You can easily add SDK dependency to your project, just follow the examples below:
Use this packages for Java projects.
Obtain an Access Token
When users want to start sending and receiving messages in a browser or mobile device, Virgil can't trust them right away. Clients have to be provided with a unique identity, thus, you'll need to give your users the Access Token that tells Virgil who they are and what they can do.
Each user must send to you the Access Token request with their registration request. Then, your service that will be responsible for handling access requests must handle them in case of users successful registration on your Application server.
// an example of an Access Token representation
With a Token
With the Access Token we can initialize the Virgil PFS SDK on the client-side to start doing fun stuff like sending and receiving messages. To initialize the on a client-side you need to use the following code:
VirgilApi virgil = new VirgilApiImpl("[YOUR_ACCESS_TOKEN_HERE]");
Without a Token
In case of a creation you don't need to initialize the SDK with the Access Token. For more information about the Global Virgil Card creation check out the Creating Global Card guide.
Use the following code to initialize the Virgil SDK without the Access Token.
VirgilApi virgil = new VirgilApiImpl();