GUI configuration
This page describes how to configure the Net iD Portal GUI using the config.js file, and how to brand and style the user interface.
Configuration file overview
The portal GUI is configured using a JavaScript configuration called config.js file loaded at runtime.
📂 root
📂 public (1)
📄 config.js (2)
| 1 | The directory where the configuration file must be placed for the portal to work. |
| 2 | The file containing the runtime configuration for the portal GUI. |
/**
* This is a template configuration file. The real config file is called config.js.
* You must have a config.js file in the root/public directory for the portal to work.
*/
window.runtimeConfig = {
portalServiceConfig: {
/* API configs */
backendUrl: '/api/portalapi/servicerest.svc', // API url.
/* Auth configs */
logoffOnRemoval: true, // Log off user when auth token is removed/disconnected
logonOneTimePassword: true, // Enable one-time password login
logonOneTimePasswordWithUser: '', // Specify user field for one-time password
logonExtraField: 'subject:2.5.4.10;issuer:2.5.4.3',
/* Menu links (used in the main menu) */
urlHelp: 'http://www.pointsharp.com/help/', // Link to help page
urlInfo: 'https://service.pointsharp.com', // Link to info page
urlTest: 'https://www.pointsharp.com/test/', // Link to token test page
/* SDK configs */
backendSignMatch:
'authid,subject;issuer,subject;authid,subject=CN+2.5.4.5;authid,subject=2.5.4.5;authid,subject=CN;issuer=O,subject=CN+O+OU;same-as-logon', // Filtering certificate attributes for matching a single certificate when sign a task.
backendVerifyCertificate: false, // An extra verification of the server certificate if needed but will effect performance.
requiredLogonSubject: '2.5.4.3', // The OID (object identifier) of the certificate that will be presented at logon (e.g. 2.5.4.3 (X509-CommonName)).
pluginParameters:
'silent=false;timeout=333;delay=33;web-extension=true;call-trace=false', // Parameter settings for the Net iD plugin. Do not change these settings.
tokenModel: { allow: [], ignore: ['Mifare'] }, // Allow-list and ignore-list for token models that should / should not be used and presented by Net iD Plugin (e.g. built-in SIM-cards or MIFARE readers should not be used).
developerOnly: {
forceEncryption: false, // Test encryption during development
},
/* Search configs */
autoSearchOnInput: true, // Enable automatic search on input.
/* Translation configs */
languageList: [
// List of supported languages, we'll only show the ones you add here.
{ name: 'English', code: 'en-US', default: true }, // Default (and fallback) language.
{ name: 'Suomi', code: 'fi-FI' },
{ name: 'Svenska', code: 'sv-SE' },
{ name: 'Français', code: 'fr-FR' },
{ name: 'Deutsch', code: 'de-DE' },
{ name: 'Nederlands', code: 'nl-NL' },
{ name: 'Polski', code: 'pl-PL' },
],
showTranslationKeys: false, // Show translation keys in the UI for easier translation (for dev only)
showMissingTranslationKeys: false, // Mark missing translation keys in the UI (for dev only)
},
};
API configuration
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
Base URL to the portal backend REST API used by the GUI. |
Example |
|
If the GUI and API are hosted on different hosts or paths, make sure this URL points to the correct API endpoint and that your CSP connect-src directive allows it.
Authentication configuration
Key |
|
|---|---|
Type |
Boolean |
Default |
|
Description |
If set to |
Recommendation |
Keep enabled for better session security. |
Key |
|
|---|---|
Type |
Boolean |
Default |
|
Description |
Enables one-time password (OTP) login in the portal. |
Notes |
Set to |
Key |
|
|---|---|
Type |
String |
Default |
Empty string |
Description |
Optional. Specifies which user field should be combined with the one-time password (for example username or email). |
Example |
|
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
Extra certificate fields used at logon, given as a semicolon-separated list of |
Notes |
Intended for administrators familiar with the certificate profile. Do not change unless you know the impact. |
Menu links
These settings control the external links available in the main menu.
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
URL for the Help page link in the main menu. |
Typical change |
Point this to your own support or help site. |
Example |
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
URL for the general information / service link in the main menu. |
Example |
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
URL for a token test or diagnostic page shown in the main menu. |
Example |
SDK and token handling configuration
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
Controls how certificate attributes are used to match a single certificate when signing a task. |
Notes |
Advanced setting. Use the default unless instructed otherwise by support. |
Key |
|
|---|---|
Type |
Boolean |
Default |
|
Description |
Enables an extra verification step of the server certificate. |
Impact |
Improves security but may negatively affect performance. |
Recommendation |
Enable only if required by your security policy. |
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
OID of the certificate attribute that must be present at logon (for example |
Notes |
Align this value with your certificate policy. |
Key |
|
|---|---|
Type |
String |
Default |
|
Description |
Parameter settings for the Net iD plugin. |
Warning |
Do not change these settings in normal deployments. |
Key |
|
|---|---|
Type |
Object |
Default |
|
Description |
Controls which token models are allowed or ignored by the Net iD plugin. |
Details |
If |
tokenModel: {
allow: ['SmartCard', 'USBToken'],
ignore: ['Mifare', 'SimCard'],
}
Key |
|
|---|---|
Type |
Boolean |
Default |
|
Description |
Developer-only option used to test encryption behavior. |
Warning |
Not intended for production use. |
Search configuration
Key |
|
|---|---|
Type |
Boolean |
Default |
|
Description |
If enabled, the portal automatically performs a search as the user types. |
Notes |
Set to |
Translation and language configuration
Key |
|
|---|---|
Type |
Array of objects |
Default |
|
Description |
Defines the list of UI languages that will be available to users. |
Fields |
Each entry has: |
languageList: [
{ name: 'English', code: 'en-US', default: true },
{ name: 'Svenska', code: 'sv-SE' },
]
Only languages listed here are available in the GUI.
Exactly one language should be marked as default.
This language is also used as the fallback.
Key |
|
|---|---|
Type |
Boolean |
Default |
|
Description |
Shows translation keys instead of translated texts in the UI. |
Use case |
Development and translation work only. |
Key |
|
|---|---|
Type |
Boolean |
Default |
|
Description |
Highlights missing translation keys in the UI. |
Use case |
Development and translation debugging only. |
GUI branding and styling
The GUI can be branded using a header logo (theme image) and custom styling of header and menu elements.
Organization logo (theme image)
The header includes an organizsation logo (theme image).
Maximum height |
|
|---|---|
Recommended height |
between |
Width |
No explicit technical limit. |
Although the width is not technically limited, very wide logos can:
-
Push other header content out of view
-
Look cramped on smaller screens
|
For best visual results, use a horizontally oriented logo with height between 24–34 px, and a width that fits comfortably within the header (approximately up to 200–250 px for typical desktop layouts). |
Custom styling options
The following elements can be styled:
| Setting | Purpose | Example value |
|---|---|---|
|
Header background color |
|
|
Bottom border of the header |
|
|
Header text color |
|
|
Menu background color |
|
|
Menu text color |
|
|
Right border of the menu area |
|
|
Background for hovered menu items |
|
|
Text color for hovered menu items |
|
|
Background for the active (selected) menu item |
|
|
Text color for the active menu item |
|
|
Border between menu items |
|
The concrete wiring of these settings, for example, as a theme object inside portalServiceConfig) is implementation-specific, but from a user perspective they take standard CSS color strings and border definitions.
Content security policy (CSP)
The Content Security Policy (CSP) for Net iD Portal is configured on the web server or reverse proxy that serves the GUI. The portal GUI does not set the CSP header itself.
From the GUI perspective, the CSP must allow:
-
script-src 'self' 'unsafe-eval'; -
style-src 'self' 'unsafe-inline';
If these directives are not present, the GUI does not work correctly.
If backendUrl points to another origin, that origin must be allowed in the CSP connect-src directive.
Content-Security-Policy:
default-src 'self';
script-src 'self' 'unsafe-eval';
style-src 'self' 'unsafe-inline';
img-src 'self' data:;
font-src 'self';
connect-src 'self';
object-src 'none';
base-uri 'self';
frame-ancestors 'self';
When the API is on a different origin, extend connect-src accordingly, for example:
connect-src 'self' https://api.example.com;
For general security guidance and more CSP examples, see the Security and CSP page in the installation documentation.