lib/util/token-util.js
function getCliendIdFromCert() {
	var x509 = require('x509');
	var certJson = x509.parseCert(fs.readFileSync(process.cwd()+Constant.CERTIFICATE_PATH).toString());
	var cliendId = cert && cert.subject && cert.subject.commonName;

	return clientId;
}
function getCliendIdFromCert() {
	var x509 = require('x509');
	var certJson = x509.parseCert(fs.readFileSync(process.cwd()+Constant.CERTIFICATE_PATH).toString());
	var cliendId = cert && cert.subject && cert.subject.commonName;

	return clientId;
}
function getCliendIdFromCert ( ) { var x509 = require ( 'x509' ) ; var certJson = x509 . parseCert ( fs . readFileSync ( process . cwd ( ) + Constant . CERTIFICATE_PATH ) . toString ( ) ) ; var cliendId = cert && cert . subject && cert . subject . commonName ; return clientId ; }
Parse the certificate, and return the clientId from the commonName field in subject.
@returns
Parse the certificate and return the clientId from the commonName field in subject .