Skip to main content
Skip table of contents

Virtual smart card - script for managing options in Smart ID Identity Manager

This is the script that is used to manage the options in the Virtual smart card package in Smart ID.

//---------------- Get virtual smart card ----------------

/* 
Defines what kind of certificates will be requested for the virtual smart card
 * true - Included in the certificate request
 * false - Not enrolled to the virtual smart card
*/
VirtualSmartCardOptionRequestEncryptionCertificate = true
VirtualSmartCardOptionRequestSignatureCertificate = true   
VirtualSmartCardOptionRequestAuthenticationCertificate = true 

/*************************************************************************************/

/* 
Defines the validity of the virtual smart card
*/
def date = new Date()

CredentialsDp_ValidFrom = date

var yearsOfValidity = 2 // --> CHANGE HERE

// Calculate the validity by adding the 'yearsOfValidity' value to the current date 
use(TimeCategory) {
    CredentialsDp_ValidTo = binding.variables["CredentialsDp_ValidFrom"] + yearsOfValidity.year  
}

/*************************************************************************************/

/* 
Defines properties which will be visible directly on the virtual smart card
*/
VirtualSmartCardOptionUserID = binding.variables["UsersDp_Email"] // --> CHANGE WITHIN []. In this example, UsersDp_Email is a data pool field but can be any text value
VirtualSmartCardOptionServerName = "Nexus GO Services - Virtual Smart Card" // --> CHANGE HERE
VirtualSmartCardOptionProfileName = "Virtual smart card " + binding.variables["UsersDp_Email"] // --> CHANGE WITHIN []  In this example, UsersDp_Email is a data pool field but can be any text value


/*************************************************************************************/

/*
Defines the min and max length of the virtual smart card
*/

VirtualSmartCardOptionPinMinLength = 6 // --> CHANGE HERE
VirtualSmartCardOptionPinMaxLength = 15 // --> CHANGE HERE

/* 
Defines if upper case letters are allowed in the PIN
  * Valid values: ALLOWED (default), DISALLOWED, REQUIRED
*/ 

VirtualSmartCardOptionPinUpperCase = "ALLOWED" 

/* 
Defines if lower case letters are allowed in the PIN
  * Valid values: ALLOWED (default), DISALLOWED, REQUIRED
*/ 

VirtualSmartCardOptionPinLowerCase = "ALLOWED" 

/* 
Defines if pin digits are allowed in the PIN
  * Valid values: ALLOWED (default), DISALLOWED, REQUIRED
*/ 
VirtualSmartCardOptionDigitsAllowed = "ALLOWED"

/* 
Defines if special characters are allowed for the PIN
   * Valid values: ALLOWED (default), DISALLOWED, REQUIRED
*/
VirtualSmartCardOptionSpecialCharactersAllowed = "ALLOWED" 


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.