You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Supports configuration factory using attribute `enviroment` to specify either `production` or `testing`.
24
+
25
+
```javascript
26
+
var config =eid.configFactory({
27
+
clientType:'bankid',
28
+
enviroment:'testing'
29
+
});
30
+
```
31
+
32
+
### Configuration Object
33
+
34
+
Use the Configuration Factory to get a pre-populated object
35
+
36
+
```javascript
37
+
var config = {
38
+
// Client type (must be bankid to use this client)
39
+
clientType:'bankid',
40
+
// The base URI to call the Rest-API
41
+
endpoint:'https://appapi2.test.bankid.com/rp/v5',
42
+
// The PFX file content to use
43
+
client_cert:'...',
44
+
// The password for the PFX
45
+
password:'test',
46
+
// The CA public cert for SSL communications
47
+
ca_cert:'...',
48
+
// Allow usage of fingerprint to sign in app for end-users
49
+
allowFingerprint:true
50
+
};
51
+
```
52
+
53
+
### Extension Methods
54
+
55
+
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. Also accept `allowFingerprint` as boolean to specify if fingerprint auth is allowed in the app or not, if not specified default value from config will be used.
56
+
57
+
If `id` is not supplied to `doRequest` and `initRequest` the request will start and the properties `qrStartSecret`,`qrStartToken`,`qrAuthTime` will be returned as extra attributes for use with QR-code logins. Also the `qrCodeString` is populated with an initial calculation for the request.
58
+
59
+
**Extension methods**
60
+
61
+
*`createQRCodeString({qrStartSecret,qrStartToken,qrAuthTime})`<br/>Returns a correctly formatted QR-code for starting BankID app. The paramets are obtained when starting a authentication request without a id. It then returns `qrStartSecret`,`qrStartToken`,`qrAuthTime` as extra attributes. This method must be polled every 5 seconds at the most to obtain a new code when using QR-login.
0 commit comments