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
Copy file name to clipboardexpand all lines: src/DependencyInjection/Configuration.php
+53-4
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,19 @@ public function getConfigTreeBuilder(): TreeBuilder
30
30
->scalarNode('account_id')
31
31
->info('Obtain your accountId from DocuSign: the account id is shown in the drop down on the upper right corner of the screen by your picture or the default picture')
32
32
->cannotBeEmpty()
33
+
->validate()
34
+
->ifTrue(staticfunction ($v) {
35
+
try {
36
+
Assert::integer($v);
37
+
Assert::true(7 === \strlen((string) $v));
38
+
39
+
returnfalse;
40
+
} catch (\Exception$e) {
41
+
returntrue;
42
+
}
43
+
})
44
+
->thenInvalid('Invalid account id %s')
45
+
->end()
33
46
->end()
34
47
->scalarNode('default_signer_name')
35
48
->info('Recipient Information as the signer full name')
@@ -95,10 +108,46 @@ public function getConfigTreeBuilder(): TreeBuilder
95
108
->isRequired()
96
109
->info('Configure JSON Web Token (JWT) authentication: https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-jsonwebtoken')
97
110
->children()
98
-
->scalarNode('private_key')->isRequired()->info('Path to the private RSA key generated by DocuSign')->end()
99
-
->scalarNode('integration_key')->isRequired()->info('To generate your integration key, follow this documentation: https://developers.docusign.com/esign-soap-api/reference/Introduction-Changes/Integration-Keys')->end()
100
-
->scalarNode('user_guid')->isRequired()->info('Obtain your user UID (also called API username) from DocuSign Admin > Users > User > Actions > Edit')->end()
101
-
->integerNode('ttl')->defaultValue(3600)->info('Token TTL in seconds (default: 3600)')->end()
111
+
->scalarNode('private_key')
112
+
->isRequired()
113
+
->info('Path to the private RSA key generated by DocuSign')
114
+
->end()
115
+
->scalarNode('integration_key')
116
+
->isRequired()
117
+
->info('To generate your integration key, follow this documentation: https://developers.docusign.com/esign-soap-api/reference/Introduction-Changes/Integration-Keys')
118
+
->validate()
119
+
->ifTrue(staticfunction ($v) {
120
+
try {
121
+
Assert::uuid($v);
122
+
123
+
returnfalse;
124
+
} catch (\Exception$e) {
125
+
returntrue;
126
+
}
127
+
})
128
+
->thenInvalid('Invalid integration key %s')
129
+
->end()
130
+
->end()
131
+
->scalarNode('user_guid')
132
+
->isRequired()
133
+
->info('Obtain your user UID (also called API username) from DocuSign Admin > Users > User > Actions > Edit')
0 commit comments