Create and Publish Card on Cards ServicesThis guide shows how to create a user's Card with public key inside, and publish a Card on the Virgil Cards Service.Prerequisites for workInstall SDK & Setup Virgil Crypto This language is only suitable for Server side. # this language is not supported yet.Set up a storage for Private KeysSetup a VSSKeyStorage in order to save private keys after their generation.# this language is not supported yet.Set up authentication on a client side and send a JWT requestIn order to make call to Virgil Services, for example, to publish user's Card on Virgil Cards Service you need to have a JSON Web Token ("JWT"). Virgil SDKs let you use Virgil token-generation functionality without having to know how they're constructed.After a user installs Virgil SDK you'll need to set up jwtProvider for providing users with a JWT. You'll need to give your users a JWT that tells Virgil who they are and what they can do.Requests to your app server must be authorized. You can use for this task any kind of authentication, for example, Google auth.Set up JWT providerUse these lines of code to specify which JWT generation source you prefer to use in your project:# this language is not supported yet.Set up authentication on a server side and generate a JWTCollect your Virgil developer credentialsParameterDescriptionAPP_IDID of your Application at Virgil DashboardAPI_KEY_IDA unique string value that identifies your account at the Virgil developer portalAPI_KEYA Private Key that is used to sign API calls to Virgil Services. For security, you will only be shown the API Private Key when the key is created. Don't forget to save it in a secure location for the next stepNext, you'll set up the JwtGenerator using the Virgil SDK. You'll use your API Key that was created at Virgil Dashboard. For security purposes, you have to generate JWT on your server side. Each JWT is granted access to a specific Application and has a limited lifetime that is configured by you. However, best practice is to generate JWT for the shortest amount of time feasible for your application.Here is an example of how to generate JWT:# this language is not supported yet.Set up Card VerifierVirgil Card Verifier helps you automatically verify signatures of a User's Card, for example when you get a Card from Virgil Cards Service.By default, VirgilCardVerifier verifies only two signatures - a Card owner and Virgil Cards Service.Set up VirgilCardVerifier with the following lines of code:# this language is not supported yet.Set up Cards Manager to manage public keysWith Cards Manager you can:specify an access Token (JWT) Provider.specify a Crypto Library that you’re planning to use for crypto operations.specify a Card Verifier used to verify signatures of your users, your App Server, Virgil Services (optional).Set up CryptoUse the following lines of code to specify which crypto library (Virgil or your own) you prefer to use in your project:# this language is not supported yet.Initialize Card ManagerUse the following lines of code to set up the Card Manager:# this language is not supported yet.You cannot change a Card's content after it's published because it's signed with the owner's Private Key.Create CardOnce a Virgil SDK and a Crypto Library are ready we can generate a Private Key and create a user's Card. Use the following lines of code to create and publish a user's Card (without a signature from your app server):# this language is not supported yet.As result, a user's Card will be published on the Virgil Cards Service, where it will be available at any time. The private keys stay on a user's devices.Remember that each user can have as many Cards as he/she needs for various tasks. If you create more than one Card for a user, you can specify information about the previous Card when you create the next Card.For more information about Card structure and creation, click hereIf you want to add an additional layer of security into your Card, you can sign a Card with an additional key, for example, with the private key of your application server. Thus, you can be sure that a user's Card wasn't replaced with another one on Virgil Cards Service.