Token¶
-
public class
Token
¶ Class represents connection to a smart card (or more generally, any cryptographic device). Token objects are obtained by calling the
Reader.connect()
method.
Methods¶
generateAppLicense¶
-
public void
generateAppLicense
()¶ Generates an App License for the current token, if current API embeds this mechanism.
This function is also called internally on certificates registration, through
SCMEnvironment.registerCertificates(Token)
for instance.Note that the resulting license will be stored in app data; thus, for a same smart card, calling this function on each app instance (on a different device, after a re-installation or if app data is cleared) using this smart card is needed.
Throws: - SCMException – if an error occurred, typically if this API does not embed App License Generation.
getLicenseEndDate¶
-
public String
getLicenseEndDate
()¶ Returns the end date for the license validity.
Returns: The end date, as a string with the “YYYYMMDD” format. The return value may be “000000” for licenses with permanent validity. The return value may be an empty string for cards that do not have a license loaded, or for cards that benefit from a global licensing scheme. These cases can be identified depending on the isLicenseValid
result.
getManufacturer¶
getObjects¶
-
public List<TokenObject>
getObjects
()¶ Retrieves all objects found in the token (certificates and keys).
Note that private objects may not be returned if the associated PIN has not been verified previously. Also take in consideration that the API does not internally keep references to the retrieved objects, and calling this method will always return newly created
TokenObject
instances, even if the objects have been previously retrieved. To check whether twoTokenObject
instances refer to the same physical object in the card, theTokenObject.equals
method can be used.Returns: the list of TokenObject
items.
getPins¶
getReader¶
getSerialNumber¶
hasProtectedAuthPath¶
-
public boolean
hasProtectedAuthPath
()¶ Returns
true
if this token allows user authentication through a hardware protected path (like a PIN pad reader, or using biometric recognition).Returns: true
if this token allows user authentication through a hardware protected path;false
otherwise
isInitialized¶
-
public boolean
isInitialized
()¶ Returns
true
if this this token has been initialized.Returns: true
if this token has been initialized;false
otherwise