Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »


Description

AlisonGUI is a javascript client library to access Alison-Desktop and AlisonServer certificates functionalities from any browser. AlisonGUI embed AkisonJS into it.  

Browser compatibility

Chrome

Firefox

Safari

Opera

Brave

Edge

IExplorer

Latest ✔Latest ✔Latest ✔Latest ✔Latest ✔Latest ✔

11 ✔

Download

You can [download latest stable release] of AlisonGUI.

Integration

You must include the following line in your HTML page.

<script type="text/javascript" src="alisonGUI.umd.js"></script>

Future Releases

It is possible to access future releases of the library to test new features to be implemented.


Methods

List of available methods.

Use the attribute libVersion to determine current version of the library.

Library Version
const version = alisonGUI.libVersion;

.


This method initialize the defined providers, set filters and display features and show a dialog windows to perform the selected operation.


Initialize
AlisonGUI.mount( parameter );
ArgumentRequiredDescription
parameter

A JSon string defining all the components and operations.

A description of each field can be found below.

.


Following fields can be present into the parameters.

Fields
{
	gui?: {...},
	providers: {...},
	filters?: [...],
	certificate?: {...},
	operation?: {...},
	signature?: {...},
	onConfirm: (result) {...},
	onCancel: (result) {...}
}

.


gui:

These values define some graphics features of the library.

gui:
gui: {
	logoUrl: logoUrl?,
	theme: themeId?,
	header: header?,
	language: language?,
	viewSignature: boolean?
}
ArgumentRequiredDescription
logoUrl

URL to the logo image to be included into the header of the dialog window.

themeName of the graphic theme to be used. Default value: "theme0".
header

String to describe the operation.

languageLanguage. It none is defined, library uses browser language, or "en" if the language is not supported by the library.
viewSignatureIf "true", the text to be signed is displayed on frame of the same window.

.


filters:

It's possible to define a filter to be applied on the certificate list. A filter can define several conditions.

gui:
filters: [
	{
		subject: subject?,
		issuer: issuer?,
		keysore: keystoreArray?,
		expirationWindow: expirationWindow?
	} , ...
}
ArgumentRequiredDescription
subject

A string that is included into the Distinguished Name (DN) of the subject's certificate.

issuerA string that is included into the Distinguished Name (DN) of the issuer's certificate.
keystore

An array of valid keystores. Ex: "CSK", "MACOS"].

expirationWindow

A certificate can be filtered by its expiration date.

This field must define 2 integer values: "<past-days>,<previous-days>", and these values allows to create a range around the expiration date of the certificate.

A wildcard (*) can be used to disable one of the values. Some examples:

0 , * : all valid certificates.

* , 0 : all expired certificates.

0 , 60 : valid certificates with less than 60 days of validity.

-30 , 90 : certificates close to expire (less than 90 days), or expired (less than 30 expired days).

60 , * : certificates with more than 60 days of validity.


.

.


Select a certificate


Select a Certificate
<script src="./alisonGUI.umd.js"></script>

AlisonGUI.mount({
	gui: {
		logoUrl: company.logo,
		language: "en"
	},
	providers: {
		desktop: {
			url: 
			accessToken: "ewogICJ2MiI..."
		},
		tad: {
			requestUrl: 'https://localhost:3000/requestSignature',
			responseUrl: 'https://localhost:3000/responseSignature'
		}
	},
	filters: [
		{
            expirationWindow: '0,*',
            issuer: 'CN=Bank*'
		}
	],
	onConfirm: (result) => {
		console.log("onConfirm"); 
		console.log(result);
	},
	onCancel: (result) => {
		console.log("onCancel"); 
		console.log(result);
	}
});

  • No labels