Client for communication with GRP2/Funktionstjänster (CGI) interface for BankID and Freja eID. The cancelRequest is just stubbed due to not beeing implemented by the supplier.
Information | |
---|---|
Version | 20210408 |
Status | Built-in |
Author | Daniel Sörlöv [email protected] |
Client URL | https://github.com/DSorlov/eid-provider |
Feature | Supported |
---|---|
Authentication | ✔️ |
Signatures | ✔️ |
Supports configuration factory, using attributes:
enviroment
to specify eitherproduction
ortesting
.provider
to specify eitherfreja
orbankid
.
var config = eid.configFactory({
clientType: 'grp2',
enviroment: 'testing',
provider: 'freja'
});
Use the Configuration Factory to get a pre-populated object
var config = {
// Client type to use with the config
clientType: 'grp2'
// The base URI to call the GRP2 API
endpoint: 'https://grp.funktionstjanster.se:18898/grp/v2?wsdl',
// The CA public cert for SSL communications
ca_cert: fs.readFileSync(__dirname +'frejaeid_prod.ca'),
// Display name as provided by CGI
display_name: '',
// Policy name as provided by CGI
policy: ''
};
The doRequest
and initRequest
accepts additional parameter endUserIP
which can be set to the end user ip / remote requester ip. If not supplied it will be replaced by '127.0.0.1' as in earlier versions. This however only applies when using bankid
as provider.