@pagopa/io-react-native-wallet 0.16.3 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +146 -197
- package/lib/commonjs/cie/README.md +6 -0
- package/lib/commonjs/cie/component.js +3 -1
- package/lib/commonjs/cie/component.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +6 -0
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +323 -0
- package/lib/commonjs/credential/presentation/README.md +3 -0
- package/lib/commonjs/credential/status/README.md +64 -0
- package/lib/commonjs/utils/errors.js +20 -1
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/wallet-instance/README.md +29 -0
- package/lib/commonjs/wallet-instance-attestation/README.md +35 -0
- package/lib/module/cie/README.md +6 -0
- package/lib/module/cie/component.js +2 -1
- package/lib/module/cie/component.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +7 -1
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +323 -0
- package/lib/module/credential/presentation/README.md +3 -0
- package/lib/module/credential/status/README.md +64 -0
- package/lib/module/utils/errors.js +18 -0
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/wallet-instance/README.md +29 -0
- package/lib/module/wallet-instance-attestation/README.md +35 -0
- package/lib/typescript/cie/component.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +9 -0
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cie/README.md +6 -0
- package/src/cie/component.tsx +3 -1
- package/src/credential/issuance/06-obtain-credential.ts +10 -0
- package/src/credential/issuance/README.md +323 -0
- package/src/credential/presentation/README.md +3 -0
- package/src/credential/status/README.md +64 -0
- package/src/utils/errors.ts +18 -0
- package/src/wallet-instance/README.md +29 -0
- package/src/wallet-instance-attestation/README.md +35 -0
package/README.md
CHANGED
@@ -1,251 +1,200 @@
|
|
1
1
|
# 🪪 @pagopa/io-react-native-wallet
|
2
2
|
|
3
|
-
|
3
|
+
Library which provides a high level abstraction to interact with the IT-Wallet ecosystem via a predefined flows, a set of utilities and helpers.
|
4
|
+
Follows the [eudi-wallet-it-docs](https://github.com/italia/eudi-wallet-it-docs) specifications, currently aligned with version [0.7.1](https://github.com/italia/eudi-wallet-it-docs/releases/tag/0.7.1).
|
4
5
|
|
5
|
-
|
6
|
+
## Dependencies
|
7
|
+
|
8
|
+
- [@pagopa/io-react-native-jwt](https://github.com/pagopa/io-react-native-jwt) is used to manage JWT tokens;
|
9
|
+
- [@pagopa/react-native-cie](https://github.com/pagopa/io-cie-sdk) is used to manage CIE authentication;
|
10
|
+
- [react-native-webview](https://github.com/react-native-webview/react-native-webview) is used to manage the webview for the CIE authentication flow.
|
6
11
|
|
7
12
|
## Installation
|
8
13
|
|
9
14
|
```sh
|
10
|
-
#
|
11
|
-
npm install @pagopa/io-react-native-jwt
|
15
|
+
# Install the required dependencies specified in the peerDependencies of the package.json
|
12
16
|
|
13
|
-
|
17
|
+
# Library
|
18
|
+
yarn install @pagopa/io-react-native-wallet
|
14
19
|
```
|
15
20
|
|
16
|
-
##
|
21
|
+
## Contexts
|
22
|
+
|
23
|
+
The library makes use of contexts to delegate certain aspects of the implementation to the application. Some of these aspects might greatly vary depending on the consumer application. This allows the library to be more flexible by not forcing the application to use a specific implementation and also to focus on the core functionalities.
|
17
24
|
|
18
|
-
|
25
|
+
Currently the library uses the following contexts:
|
19
26
|
|
20
27
|
<details>
|
21
|
-
<summary>
|
28
|
+
<summary>CryptoContext (cryptographic assets handling)</summary>
|
22
29
|
|
23
30
|
User flows implementions make use of tokens signed using asymmetric key pairs. Such cryptographic keys are managed by the device according to its specifications. It's not the intention of this package to handle such cryptographic assets and their peculiarities; instead, an handy interface is used to provide the right abstraction to allow responsibilities segregation:
|
24
31
|
|
25
|
-
-
|
26
|
-
-
|
32
|
+
- The application knows who to generate/store/delete keys;
|
33
|
+
- The package knows when and where to use them.
|
27
34
|
|
28
|
-
The interface is `CryptoContext` inherited from the `@pagopa/io-react-native-jwt` package
|
35
|
+
The interface is `CryptoContext` inherited from the `@pagopa/io-react-native-jwt` package:
|
29
36
|
|
30
|
-
|
37
|
+
The suggested library to manage cryptographic assets is [io-react-native-crypto](https://github.com/pagopa/io-react-native-crypto).
|
31
38
|
|
32
39
|
```ts
|
33
|
-
|
34
|
-
|
35
|
-
|
40
|
+
export interface CryptoContext {
|
41
|
+
/**
|
42
|
+
* Retrieves the public key to be used in this context.
|
43
|
+
* MUST be the same key at every invocation.
|
44
|
+
* @returns The public key to be used
|
45
|
+
* @throws If no keys are found
|
46
|
+
*/
|
47
|
+
getPublicKey: () => Promise<JWK>;
|
48
|
+
/**
|
49
|
+
* Produce a cryptographic signature for a given value.
|
50
|
+
* The signature MUST be produced using the private key paired with the public retrieved by getPublicKey()
|
51
|
+
* @param value The value to be signed
|
52
|
+
* @returns The signature
|
53
|
+
* @throws If no keys are found
|
54
|
+
*/
|
55
|
+
getSignature: (value: string) => Promise<string>;
|
56
|
+
}
|
36
57
|
```
|
37
58
|
|
38
|
-
|
39
|
-
|
40
|
-
</details>
|
41
|
-
|
42
|
-
<details>
|
43
|
-
<summary>Making HTTP requests</summary>
|
44
|
-
|
45
|
-
This package is compatibile with any http client which implements [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). Functions that makes http requests allow for an optional `appFetch` parameter to provide a custom http client implementation. If not provided, the built-in implementation on the runtime is used.
|
46
|
-
|
47
|
-
</details>
|
48
|
-
|
49
|
-
### Credential
|
50
|
-
|
51
|
-
Credential Issuance and Presentation flows are defined in under `src/credential/issuance` and `src/credential/presentation`.
|
52
|
-
Each flow exposes in the public API a function definition for each step. Some step also has an implementation; for those that have no implementation, the App is expected to fullfil.
|
53
|
-
|
54
|
-
#### Issuance
|
59
|
+
This package provides an helper to build a `CryptoContext` object bound to a given key tag
|
55
60
|
|
56
61
|
```ts
|
57
|
-
import {
|
58
|
-
|
59
|
-
// Retrieve Issuer configuration and evaluate trust
|
60
|
-
const { issuerConf } = await Credential.Issuance.evaluateIssuerTrust(...);
|
61
|
-
|
62
|
-
// Obtain the directions to perform user authorization
|
63
|
-
const { clientId, requestUri } = await Credential.Issuance.startUserAuthorization(...);
|
64
|
-
|
65
|
-
|
62
|
+
import { createCryptoContextFor } from "@pagopa/io-react-native-wallet";
|
66
63
|
|
64
|
+
const ctx = createCryptoContextFor("my-tag");
|
67
65
|
```
|
68
66
|
|
69
|
-
|
70
|
-
|
71
|
-
```ts
|
72
|
-
import { PID } from "@pagopa/io-react-native-wallet";
|
67
|
+
The
|
73
68
|
|
74
|
-
|
75
|
-
PID.SdJwt.decode("<token>");
|
69
|
+
**Be sure the key for `my-tag` already exists.**
|
76
70
|
|
77
|
-
|
78
|
-
PID.SdJwt.verify("<token>");
|
79
|
-
```
|
71
|
+
</details>
|
80
72
|
|
81
|
-
|
73
|
+
<details>
|
74
|
+
<summary>AuthorizationContext (strong authentication handling)</summary>
|
82
75
|
|
83
|
-
|
76
|
+
Whenever a strong authentication is required, the library asks the consumer application to provide a way to perform the user authentication. This is done by providing a AuthenticationContext object formed as follows:
|
84
77
|
|
85
78
|
```ts
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
// obtain Wallet Provider metadata
|
95
|
-
const entityConfiguration = await getWalletProviderEntityConfiguration(
|
96
|
-
"https://wallet-provider.example"
|
97
|
-
);
|
98
|
-
|
99
|
-
// prepare the request
|
100
|
-
const wiaRequest = WalletInstanceAttestation.getAttestation({
|
101
|
-
wiaCryptoContext,
|
102
|
-
});
|
103
|
-
|
104
|
-
// request the signed Wallet Instance Attestation to the Wallet Provider
|
105
|
-
const signedWIA = await wiaRequest(entityConfiguration);
|
79
|
+
/**
|
80
|
+
* Context for authorization during the {@link 03-start-user-authorization.ts} phase.
|
81
|
+
* It consists of a single method to identify the user which takes a URL and a redirect schema as input.
|
82
|
+
* Once the authorization is completed and the URL calls the redirect schema, the method should return the redirect URL.
|
83
|
+
*/
|
84
|
+
export interface AuthorizationContext {
|
85
|
+
authorize: (url: string, redirectSchema: string) => Promise<string>;
|
86
|
+
}
|
106
87
|
```
|
107
88
|
|
108
|
-
|
89
|
+
The authorize function is called with the URL to be opened and the schema to be used to redirect the user back to the application. The function should return a promise that resolves with the URL that the user has been redirected to.
|
90
|
+
The suggested library to manage authorizations is [io-react-native-login-utils](https://github.com/pagopa/io-react-native-login-utils), an example is shown below:
|
109
91
|
|
110
92
|
```ts
|
111
|
-
import {
|
93
|
+
import { type AuthorizationContext } from "@pagopa/io-react-native-wallet";
|
94
|
+
import { openAuthenticationSession } from "@pagopa/io-react-native-login-utils";
|
112
95
|
|
113
|
-
|
96
|
+
const authorizationContext: AuthorizationContext = {
|
97
|
+
authorize: openAuthenticationSession,
|
98
|
+
};
|
114
99
|
```
|
115
100
|
|
116
|
-
|
117
|
-
|
118
|
-
#### Credential presentation (PID)
|
119
|
-
|
120
|
-
```ts
|
121
|
-
import {
|
122
|
-
RelyingPartySolution,
|
123
|
-
createCryptoContextFor,
|
124
|
-
getRelyingPartyEntityConfiguration,
|
125
|
-
} from "@pagopa/io-react-native-wallet";
|
126
|
-
|
127
|
-
// create crypto context for the key pair associated with the Wallet Instance Attestation
|
128
|
-
const wiaCryptoContext = createCryptoContextFor("wia-keytag");
|
129
|
-
// create crypto context for the key pair associated with PID stored in the device
|
130
|
-
const pidCryptoContext = createCryptoContextFor("pid-keytag");
|
131
|
-
|
132
|
-
// resolve RP's entity configuration
|
133
|
-
const entityConfiguration = await getRelyingPartyEntityConfiguration(
|
134
|
-
"https://relying-party.example"
|
135
|
-
);
|
136
|
-
|
137
|
-
// get request object
|
138
|
-
const getRequestObject = RelyingPartySolution.getRequestObject({
|
139
|
-
wiaCryptoContext,
|
140
|
-
});
|
141
|
-
const requestObj = await getRequestObject(
|
142
|
-
/* signed instance attestation */ walletInstanceAttestation,
|
143
|
-
/* url to request authorization to */ authorizationUrl,
|
144
|
-
entityConfiguration
|
145
|
-
);
|
146
|
-
|
147
|
-
// Submit authorization response
|
148
|
-
const sendAuthorizationResponse =
|
149
|
-
RelyingPartySolution.sendAuthorizationResponse({
|
150
|
-
pidCryptoContext,
|
151
|
-
});
|
152
|
-
|
153
|
-
const result = await sendAuthorizationResponse(requestObj, [
|
154
|
-
/* signed PID token */ pidToken,
|
155
|
-
/* array of claims to disclose from PID */ claims,
|
156
|
-
]);
|
157
|
-
```
|
158
|
-
|
159
|
-
### Trust Model
|
160
|
-
|
161
|
-
#### Fetch federation entity statements
|
101
|
+
</details>
|
162
102
|
|
163
|
-
|
164
|
-
|
165
|
-
// generic statement
|
166
|
-
getEntityStatement,
|
167
|
-
getEntityConfiguration,
|
168
|
-
// statement with shape parsing
|
169
|
-
getCredentialIssuerEntityConfiguration,
|
170
|
-
getRelyingPartyEntityConfiguration,
|
171
|
-
getTrustAnchorEntityConfiguration,
|
172
|
-
getWalletProviderEntityConfiguration,
|
173
|
-
} from "@pagopa/io-react-native-wallet";
|
174
|
-
```
|
103
|
+
<details>
|
104
|
+
<summary>IntegrityToken (device integrity)</summary>
|
175
105
|
|
176
|
-
|
106
|
+
In order to ensure the integrity of the device, the library asks the consumer application to provide a way to generate a token that can be used to verify the device integrity. This is done by providing an IntegrityToken object formed as follows:
|
177
107
|
|
178
108
|
```ts
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
);
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
await verifyTrustChain(trustChainEC, trustChain, { renewOnFail: true });
|
109
|
+
/**
|
110
|
+
* Interface for the integrity context which provides the necessary functions to interact with the integrity service.
|
111
|
+
* The functions are platform specific and must be implemented in the platform specific code.
|
112
|
+
* getHardwareKeyTag: returns the hardware key tag in a url safe format (e.g. base64url).
|
113
|
+
* getAttestation: requests the attestation from the integrity service.
|
114
|
+
* getHardwareSignatureWithAuthData: signs the clientData and returns the signature with the authenticator data.
|
115
|
+
*/
|
116
|
+
export interface IntegrityContext {
|
117
|
+
getHardwareKeyTag: () => string;
|
118
|
+
getAttestation: (nonce: string) => Promise<string>;
|
119
|
+
getHardwareSignatureWithAuthData: (
|
120
|
+
clientData: string
|
121
|
+
) => Promise<HardwareSignatureWithAuthData>;
|
122
|
+
}
|
194
123
|
```
|
195
124
|
|
196
|
-
|
197
|
-
|
198
|
-
### NodeJS and Ruby
|
125
|
+
Usually this is achieved by using [Google Play Integrity API](https://developer.android.com/google/play/integrity/overview) and [Key Attestation](https://developer.android.com/privacy-and-security/security-key-attestation) on Android, [DCAppAttestService](https://developer.apple.com/documentation/devicecheck/establishing-your-app-s-integrity) on iOS.
|
199
126
|
|
200
|
-
|
201
|
-
We recommend the use of a virtual environment of your choice. For ease of use, this guide adopts [nodenv](https://github.com/nodenv/nodenv) or [nvm](https://github.com/nvm-sh/nvm) for NodeJS and [rbenv](https://github.com/rbenv/rbenv) for Ruby.
|
202
|
-
[Yarn](https://yarnpkg.com/) is the package manager of choice.
|
127
|
+
The suggested library to manage integrity is [io-react-native-integrity](https://github.com/pagopa/io-react-native-integrity).
|
203
128
|
|
204
|
-
|
205
|
-
while the version of Ruby is stored in [example/.ruby-version](.ruby-version).
|
206
|
-
|
207
|
-
### React Native
|
208
|
-
|
209
|
-
Follow the [official tutorial](https://reactnative.dev/docs/environment-setup?guide=native) for installing the `React Native CLI` for your operating system.
|
210
|
-
|
211
|
-
If you have a macOS system, you can follow both the tutorial for iOS and for Android. If you have a Linux or Windows system, you only need to install the development environment for Android.
|
212
|
-
|
213
|
-
### Build the app
|
214
|
-
|
215
|
-
In order to build the app,
|
216
|
-
As stated [previously](#nodejs-and-ruby), we also use `nodenv` and `rbenv` for managing the environment:
|
217
|
-
|
218
|
-
```bash
|
219
|
-
# Clone the repository
|
220
|
-
$ git clone https://github.com/pagopa/io-react-native-wallet
|
221
|
-
|
222
|
-
# CD into the repository
|
223
|
-
$ cd io-react-native-wallet
|
224
|
-
|
225
|
-
# Install library dependencies
|
226
|
-
$ yarn install
|
227
|
-
|
228
|
-
# CD into the example folder
|
229
|
-
$ cd example
|
230
|
-
|
231
|
-
# Install bundle
|
232
|
-
$ gem install bundle
|
129
|
+
</details>
|
233
130
|
|
234
|
-
|
235
|
-
|
236
|
-
$ bundle install
|
131
|
+
<details>
|
132
|
+
<summary>appFetch (making HTTP requests)</summary>
|
237
133
|
|
238
|
-
|
239
|
-
# Run this only during the first setup and when JS dependencies change
|
240
|
-
$ yarn install
|
134
|
+
This package is compatibile with any http client which implements [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). Functions that makes http requests allow for an optional `appFetch` parameter to provide a custom http client implementation. If not provided, the built-in implementation on the runtime is used.
|
241
135
|
|
242
|
-
|
243
|
-
# Run this only during the first setup and when Pods dependencies change
|
244
|
-
$ cd ios && bundle exec pod install && cd ..
|
136
|
+
</details>
|
245
137
|
|
246
|
-
|
247
|
-
|
138
|
+
### Flows
|
139
|
+
|
140
|
+
Different flows are provided to perform common operations. Each flow is a set of steps that must be executed in a given order. The documentation is provided inside the related folder:
|
141
|
+
|
142
|
+
- Wallet Instance
|
143
|
+
- [Creation](./src/wallet-instance/README.md)
|
144
|
+
- [Attestation](./src/wallet-instance-attestation/README.md)
|
145
|
+
- Credentail
|
146
|
+
- [Issuance](./src/credential/issuance/README.md)
|
147
|
+
- [Presentation](./src/credential/presentation/README.md) (TODO)
|
148
|
+
- [Status](./src/credential/status/README.md)
|
149
|
+
|
150
|
+
### Example
|
151
|
+
|
152
|
+
An example app is provided in [example](./example) folder which demostrates how to implemente these flows. To run it, follow the instructions in the [README](./example/README.md).
|
153
|
+
|
154
|
+
### Ecosystem
|
155
|
+
|
156
|
+
`io-react-native-wallet` is designed to be used in [io-app](https://github.com/pagopa/io-app) and its ecosystem. There are a few libraries that can be used to implement the context required to implement the flows defined by this package.
|
157
|
+
Below there's a list of the libraries and a schema of how they interact with each other:
|
158
|
+
|
159
|
+
- [@pagopa/io-react-native-crypto](https://github.com/pagopa/io-react-native-crypto) - Used to manage cryptographic keys and signatures
|
160
|
+
- [@pagopa/io-react-native-integrity](https://github.com/pagopa/io-react-native-integrity) - Used to manage and verify the integrity of the device
|
161
|
+
- [@pagopa/io-react-native-login-utils](https://github.com/pagopa/io-react-native-login-utils) - Used to manage strong authentication flows securely
|
162
|
+
- [@pagopa/io-react-native-secure-storage](https://github.com/pagopa/io-react-native-secure-storage) - Used to store data securely on the device
|
163
|
+
|
164
|
+
```mermaid
|
165
|
+
graph TD;
|
166
|
+
ioa[io-app]
|
167
|
+
iornw[io-react-native-wallet]
|
168
|
+
iornc[io-react-native-crypto]
|
169
|
+
iorni[io-react-native-integrity]
|
170
|
+
iornlu[io-react-native-login-utils]
|
171
|
+
iornss[io-react-native-secure-storage]
|
172
|
+
iornjwt[io-react-native-jwt]
|
173
|
+
rncie[react-native-cie]
|
174
|
+
rnw(react-native-webview)
|
175
|
+
|
176
|
+
ioa --> iornw
|
177
|
+
iornw --> iornjwt
|
178
|
+
iornw --> rncie
|
179
|
+
iornw --> rnw
|
180
|
+
|
181
|
+
subgraph IoApp Deps
|
182
|
+
direction TB
|
183
|
+
iornc
|
184
|
+
iorni
|
185
|
+
iornlu
|
186
|
+
iornss
|
187
|
+
end
|
188
|
+
|
189
|
+
subgraph IoRnWallet Deps
|
190
|
+
iornjwt
|
191
|
+
rncie
|
192
|
+
rnw
|
193
|
+
end
|
194
|
+
|
195
|
+
ioa --> |dependency to implement CryptoContext| iornc
|
196
|
+
ioa --> |dependency to implement IntegrityContext| iorni
|
197
|
+
ioa --> |dependency to implement AuthorizationContext| iornlu
|
198
|
+
ioa --> |dependency to store credentials| iornss
|
248
199
|
|
249
|
-
# Run the app on Android
|
250
|
-
$ yarn android
|
251
200
|
```
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# CIE
|
2
|
+
|
3
|
+
This library provides a components and a set of utilities to interact with the physical [CIE (Carta d'Identità Elettronica)](https://www.cartaidentita.interno.gov.it/) card. It can be used to [obtain an eID](../credential/issuance/README.md) via strong authentication.
|
4
|
+
Under the hood it uses [@pagopa/react-native-cie](https://github.com/pagopa/io-cie-sdk) to interact with the card and [react-native-webview](https://github.com/react-native-webview/react-native-webview) to complete the authorization flow.
|
5
|
+
|
6
|
+
An example of usage can be found in the [example](./example) folder of this repository.
|
@@ -11,6 +11,8 @@ var _manager = require("./manager");
|
|
11
11
|
var _error = require("./error");
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
14
|
+
const AUTH_LINK_PATTERN = "lettura carta";
|
15
|
+
|
14
16
|
/* To obtain the authentication URL on CIE L3 it is necessary to take the
|
15
17
|
* link contained in the "Entra con lettura carta CIE" button.
|
16
18
|
* This link can then be used on CieManager.
|
@@ -20,7 +22,7 @@ const injectedJavaScript = `
|
|
20
22
|
(function() {
|
21
23
|
function sendDocumentContent() {
|
22
24
|
const idpAuthUrl = [...document.querySelectorAll("a")]
|
23
|
-
.filter(a => a.textContent.includes("
|
25
|
+
.filter(a => a.textContent.toLowerCase().includes("${AUTH_LINK_PATTERN}"))
|
24
26
|
.map(a=>a.href)[0];
|
25
27
|
|
26
28
|
if(idpAuthUrl) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_manager","_error","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","injectedJavaScript","CieEvent","exports","iOSUserAgent","defaultUserAgent","Platform","select","ios","undefined","webView","createRef","WebViewComponent","params","webViewUrl","setWebViewUrl","React","useState","authUrl","isCardReadingFinished","setCardReadingFinished","continueWithUrl","callbackUrl","handleMessage","event","cieAuthorizationUri","nativeEvent","data","startCie","startCieiOS","startCieAndroid","useUat","pin","onError","onEvent","handleShouldStartLoading","onSuccess","redirectUrl","url","includes","handleOnLoadEnd","onCieEvent","e","eventTitle","title","toLowerCase","handleOnError","Error","completed","error","webViewError","webViewHttpError","statusCode","description","CieError","message","type","CieErrorType","WEB_VIEW_ERROR","code","createElement","WebView","ref","userAgent","javaScriptEnabled","source","uri","onLoadEnd","onHttpError","onShouldStartLoadWithRequest","onMessage"],"sourceRoot":"../../../src","sources":["cie/component.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AASA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAiD,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAEjD;AACA;AACA;AACA;AACA;AACA,
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_manager","_error","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","AUTH_LINK_PATTERN","injectedJavaScript","CieEvent","exports","iOSUserAgent","defaultUserAgent","Platform","select","ios","undefined","webView","createRef","WebViewComponent","params","webViewUrl","setWebViewUrl","React","useState","authUrl","isCardReadingFinished","setCardReadingFinished","continueWithUrl","callbackUrl","handleMessage","event","cieAuthorizationUri","nativeEvent","data","startCie","startCieiOS","startCieAndroid","useUat","pin","onError","onEvent","handleShouldStartLoading","onSuccess","redirectUrl","url","includes","handleOnLoadEnd","onCieEvent","e","eventTitle","title","toLowerCase","handleOnError","Error","completed","error","webViewError","webViewHttpError","statusCode","description","CieError","message","type","CieErrorType","WEB_VIEW_ERROR","code","createElement","WebView","ref","userAgent","javaScriptEnabled","source","uri","onLoadEnd","onHttpError","onShouldStartLoadWithRequest","onMessage"],"sourceRoot":"../../../src","sources":["cie/component.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AASA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAiD,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAA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CAAkC;QAC3CC,IAAI,EAAEC,mBAAY,CAACC;MACrB,CAAC,CACH,CAAC;IACH;EACF,CAAC;EAEH,oBACEvF,MAAA,CAAAc,OAAA,CAAA2E,aAAA,CAACrF,mBAAA,CAAAsF,OAAO;IACNC,GAAG,EAAEpD,OAAQ;IACbqD,SAAS,EAAE1D,gBAAiB;IAC5B2D,iBAAiB,EAAE,IAAK;IACxBC,MAAM,EAAE;MAAEC,GAAG,EAAEpD;IAAW,CAAE;IAC5BqD,SAAS,EAAE3B,eAAe,CAAC3B,MAAM,CAACoB,OAAO,EAAEpB,MAAM,CAACqB,OAAO,CAAE;IAC3DD,OAAO,EAAEa,aAAa,CAACjC,MAAM,CAACoB,OAAO,CAAE;IACvCmC,WAAW,EAAEtB,aAAa,CAACjC,MAAM,CAACoB,OAAO,CAAE;IAC3ChC,kBAAkB,EAAEA,kBAAmB;IACvCoE,4BAA4B,EAAElC,wBAAwB,CACpDtB,MAAM,CAACuB,SAAS,EAChBvB,MAAM,CAACwB,WACT,CAAE;IACFiC,SAAS,EAAE/C;EAAc,CAC1B,CAAC;AAEN,CAAC;AAACpB,OAAA,CAAAS,gBAAA,GAAAA,gBAAA"}
|
@@ -103,6 +103,12 @@ const handleObtainCredentialError = e => {
|
|
103
103
|
if (!(e instanceof _errors.UnexpectedStatusCodeError)) {
|
104
104
|
throw e;
|
105
105
|
}
|
106
|
+
|
107
|
+
// Although it is technically not an error, we handle it as such to avoid
|
108
|
+
// changing the return type of `obtainCredential` and introduce a breaking change.
|
109
|
+
if (e.statusCode === 201) {
|
110
|
+
throw new _errors.CredentialIssuingNotSynchronousError("This credential cannot be issued synchronously. It will be available at a later time.", e.message);
|
111
|
+
}
|
106
112
|
if (e.statusCode === 404) {
|
107
113
|
throw new _errors.CredentialNotEntitledError("Invalid status found for the given credential", e.message);
|
108
114
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_dpop","_reactNativeUuid","_interopRequireDefault","obj","__esModule","default","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","SignJWT","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","exports","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","openid_credential_issuer","credential_endpoint","signedNonceProof","c_nonce","constainsCredentialDefinition","authorization_details","some","c","credential_configuration_id","format","type","ValidationFailed","credentialRequestFormBody","credential_definition","proof","jwt","proof_type","tokenRequestSignedDPop","createDPopToken","htm","htu","jti","uuid","v4","ath","sha256ToBase64","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","hasStatus","res","json","CredentialResponse","safeParse","catch","handleObtainCredentialError","success","error","message","data","e","UnexpectedStatusCodeError","statusCode","CredentialNotEntitledError","CredentialRequestError"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_dpop","_reactNativeUuid","_interopRequireDefault","obj","__esModule","default","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","SignJWT","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","exports","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","openid_credential_issuer","credential_endpoint","signedNonceProof","c_nonce","constainsCredentialDefinition","authorization_details","some","c","credential_configuration_id","format","type","ValidationFailed","credentialRequestFormBody","credential_definition","proof","jwt","proof_type","tokenRequestSignedDPop","createDPopToken","htm","htu","jti","uuid","v4","ath","sha256ToBase64","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","hasStatus","res","json","CredentialResponse","safeParse","catch","handleObtainCredentialError","success","error","message","data","e","UnexpectedStatusCodeError","statusCode","CredentialIssuingNotSynchronousError","CredentialNotEntitledError","CredentialRequestError"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAqC,SAAAM,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAc9B,MAAMG,gBAAgB,GAAG,MAAAA,CAC9BC,KAAa,EACbC,MAAc,EACdC,QAAgB,EAChBC,GAAkB,KACE;EACpB,MAAMC,GAAG,GAAG,MAAMD,GAAG,CAACE,YAAY,CAAC,CAAC;EACpC,OAAO,IAAIC,yBAAO,CAACH,GAAG,CAAC,CACpBI,UAAU,CAAC;IACVP;EACF,CAAC,CAAC,CACDQ,kBAAkB,CAAC;IAClBC,GAAG,EAAE,sBAAsB;IAC3BL;EACF,CAAC,CAAC,CACDM,WAAW,CAACR,QAAQ,CAAC,CACrBS,SAAS,CAACV,MAAM,CAAC,CACjBW,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,MAAM,CAAC,CACzBC,IAAI,CAAC,CAAC;AACX,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfAC,OAAA,CAAAhB,gBAAA,GAAAA,gBAAA;AAgBO,MAAMiB,gBAAkC,GAAG,MAAAA,CAChDC,UAAU,EACVC,WAAW,EACXC,QAAQ,EACRC,oBAAoB,EACpBC,OAAO,KACJ;EACH,MAAM;IACJC,uBAAuB;I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