Creating Global Card
This guide will demonstrate how to create a Global Virgil CardGlobal Cards are created with a unique validation token received after verification through the Virgil Identity Service more .... The main feature of Global Virgil Cards is that these Cards contain an identity, which must be confirmed by a user or device. For these cases, Virgil Security has a Virgil Identity Service that is responsible for the validation of user identities. Validating a user only occur after another service - Virgil RA Services authorizes the creation of Global Virgil Cards.
For original information about the Global Virgil Card check out our Virgil Card Service endpoint.
After a Global Virgil Card's creation, it's published at the Virgil Card Service, where an owner can find their Cards at any time.
You can not change a Global Virgil Card's content after its publishing.
Each Virgil Card contains a permanent digital signature that provides data integrity for the Virgil Card over its life-cycle.
Let's start to create a Global Virgil Card
Set up your project environment before you begin to create a Global Virgil Card, with the getting started guide.
The Global Virgil Card creation procedure is shown in the figure below.
In order to create a Global Virgil Card:
- Developers need to initialize the Virgil SDKThe SDK helps take tedious complexity out of coding by providing APIs for all of Virgil Services.
$virgilApi = VirgilApi::create();
- Once the SDK is ready we can proceed to the next step:
- Generate and save the Virgil KeyThe Virgil Key is a wrapper of the user's secure Private Key more ... (it's also necessary to enter the Virgil Key's name and password).
- Create a Global Virgil Card using their recently generated Virgil Key (they will need to enter some identifying information).
// generate Alice's Key
$aliceKey = $virgilApi->Keys->generate();
//save to storage
// create Alice's Card using her newly generated Key
$aliceCard = $virgilApi->Cards->createGlobal(
The Virgil Key will be saved into default device storage. Developers can also change the Virgil Key storage directory as needed, during Virgil SDK initialization.
Virgil doesn't keep a copy of your Virgil Key. If you lose a Virgil Key, there is no way to recover it.
- Now, developers can initiate an identity verification process.
- A User has to confirm a Virgil Card's identity using a confirmation codeA code used to confirm ownership of a global identifier more ... received by email.
See our Virgil Identity Service typical workflow for an email confirmation here
- Finally, developers must publish the User's Global Virgil Card on Virgil Services.
// initiate an identity verification process.
$attempt = $aliceCard->checkIdentity();
// confirm a Card's identity using confirmation code retrived on the email.
$token = $attempt->confirm(new EmailConfirmation('[CONFIRMATION_CODE]'));
// publish a Card on the Virgil Security services.