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
(instead of using postman you can use this module directly and sign your PDF documents locally).
18
17
19
18
## Known not implemented features
20
19
@@ -95,70 +94,34 @@ This class is a kind of proxy class to the CSC API. Its constructor requires the
95
94
96
95
If you need to call an endpoint which is not covered by a proxy method, you can use the `call(string $path, ?string $accessToken = null, array $inputData = [])` method.
97
96
98
-
### The `Module` class
97
+
### How do I get an access token?
99
98
100
-
This is the main signature module which can be used with the [SetaPDF-Signer](https://www.setasign.com/signer)
101
-
component. It's constructor requires the following arguments:
99
+
An access token is returned by an authorization to the API service.
102
100
103
-
-`$accessToken` The access token
104
-
-`$client` A `Client` instance - see above
101
+
This was tested only by an OAuth2 authorization yet. You can to use an OAuth2 implementation such as
Sample code for this can be found in "[examples/generate-token.php](examples/generate-token.php)".
105
104
106
-
### How do I get an access token?
105
+
### Authorization modes
107
106
108
-
An access token is returned by an authorization to the API service.
107
+
Accessing a credential for remote signing requires an authorization from the user who owns it to control the signing
108
+
key associated to it.
109
109
110
-
This was tested only by an OAuth2 authorization yet. You can to use an OAuth2 implementation such as
110
+
The CSC API supports multiple authorization modes. The authorization mode also defines whether the signing process must
111
+
be asynchronous or not. To get this information you can call `Client::credentialsInfo()` and in the key "authMode" you'll
112
+
find one of the following authorization modes:
113
+
114
+
- implicit: the authorization process is managed by the remote service autonomously. Authentication factors are managed by the remote signing service provider by interacting directly with the user, and not by the signature application.
115
+
- explicit: the authorization process is managed by the signature application, which collects authentication factors like PIN or One-Time Passwords (OTP).
116
+
- oauth2code: the authorization process is managed by the remote service using an OAuth 2.0 mechanism based on authorization code.
117
+
118
+
For both "implicit" and "explicit" you can use the synchronous process (see [examples/demo.php](examples/demo.php) and [examples/ltv-demo.php](examples/ltv-demo.php)).
119
+
120
+
For "oauth2code" you must use the asynchronous process (see [examples/demo-async.php](examples/async-demo.php)). This
0 commit comments