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/main/java/com/pipedream/api/resources/tokens/requests/CreateTokenOpts.java
+90Lines changed: 90 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,12 @@ public final class CreateTokenOpts {
26
26
27
27
privatefinalOptional<String> errorRedirectUri;
28
28
29
+
privatefinalOptional<Integer> expiresIn;
30
+
29
31
privatefinalStringexternalUserId;
30
32
33
+
privatefinalOptional<String> scope;
34
+
31
35
privatefinalOptional<String> successRedirectUri;
32
36
33
37
privatefinalOptional<String> webhookUri;
@@ -37,13 +41,17 @@ public final class CreateTokenOpts {
37
41
privateCreateTokenOpts(
38
42
Optional<List<String>> allowedOrigins,
39
43
Optional<String> errorRedirectUri,
44
+
Optional<Integer> expiresIn,
40
45
StringexternalUserId,
46
+
Optional<String> scope,
41
47
Optional<String> successRedirectUri,
42
48
Optional<String> webhookUri,
43
49
Map<String, Object> additionalProperties) {
44
50
this.allowedOrigins = allowedOrigins;
45
51
this.errorRedirectUri = errorRedirectUri;
52
+
this.expiresIn = expiresIn;
46
53
this.externalUserId = externalUserId;
54
+
this.scope = scope;
47
55
this.successRedirectUri = successRedirectUri;
48
56
this.webhookUri = webhookUri;
49
57
this.additionalProperties = additionalProperties;
@@ -65,6 +73,14 @@ public Optional<String> getErrorRedirectUri() {
65
73
returnerrorRedirectUri;
66
74
}
67
75
76
+
/**
77
+
* @return Token TTL in seconds (max 14400 = 4 hours). Defaults to 4 hours if not specified.
78
+
*/
79
+
@JsonProperty("expires_in")
80
+
publicOptional<Integer> getExpiresIn() {
81
+
returnexpiresIn;
82
+
}
83
+
68
84
/**
69
85
* @return Your end user ID, for whom you're creating the token
70
86
*/
@@ -73,6 +89,14 @@ public String getExternalUserId() {
73
89
returnexternalUserId;
74
90
}
75
91
92
+
/**
93
+
* @return Space-separated scopes to restrict token permissions. Defaults to 'connect:*' if not specified. See https://pipedream.com/docs/connect/api-reference/authentication#connect-token-scopes for more information.
94
+
*/
95
+
@JsonProperty("scope")
96
+
publicOptional<String> getScope() {
97
+
returnscope;
98
+
}
99
+
76
100
/**
77
101
* @return URI to redirect to on success
78
102
*/
@@ -103,7 +127,9 @@ public Map<String, Object> getAdditionalProperties() {
* <p>Space-separated scopes to restrict token permissions. Defaults to 'connect:*' if not specified. See https://pipedream.com/docs/connect/api-reference/authentication#connect-token-scopes for more information.</p>
193
+
*/
194
+
_FinalStagescope(Optional<String> scope);
195
+
196
+
_FinalStagescope(Stringscope);
197
+
156
198
/**
157
199
* <p>URI to redirect to on success</p>
158
200
*/
@@ -176,6 +218,10 @@ public static final class Builder implements ExternalUserIdStage, _FinalStage {
@@ -247,6 +295,46 @@ public _FinalStage successRedirectUri(Optional<String> successRedirectUri) {
247
295
returnthis;
248
296
}
249
297
298
+
/**
299
+
* <p>Space-separated scopes to restrict token permissions. Defaults to 'connect:*' if not specified. See https://pipedream.com/docs/connect/api-reference/authentication#connect-token-scopes for more information.</p>
300
+
* @return Reference to {@code this} so that method calls can be chained together.
301
+
*/
302
+
@java.lang.Override
303
+
public_FinalStagescope(Stringscope) {
304
+
this.scope = Optional.ofNullable(scope);
305
+
returnthis;
306
+
}
307
+
308
+
/**
309
+
* <p>Space-separated scopes to restrict token permissions. Defaults to 'connect:*' if not specified. See https://pipedream.com/docs/connect/api-reference/authentication#connect-token-scopes for more information.</p>
310
+
*/
311
+
@java.lang.Override
312
+
@JsonSetter(value = "scope", nulls = Nulls.SKIP)
313
+
public_FinalStagescope(Optional<String> scope) {
314
+
this.scope = scope;
315
+
returnthis;
316
+
}
317
+
318
+
/**
319
+
* <p>Token TTL in seconds (max 14400 = 4 hours). Defaults to 4 hours if not specified.</p>
320
+
* @return Reference to {@code this} so that method calls can be chained together.
321
+
*/
322
+
@java.lang.Override
323
+
public_FinalStageexpiresIn(IntegerexpiresIn) {
324
+
this.expiresIn = Optional.ofNullable(expiresIn);
325
+
returnthis;
326
+
}
327
+
328
+
/**
329
+
* <p>Token TTL in seconds (max 14400 = 4 hours). Defaults to 4 hours if not specified.</p>
0 commit comments