Skip to content

Commit 979ddad

Browse files
committed
Apply pull request suggestions
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
1 parent f16596d commit 979ddad

4 files changed

Lines changed: 31 additions & 31 deletions

File tree

experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import io.serverlessworkflow.fluent.spec.AbstractEventConsumptionStrategyBuilder;
4141
import io.serverlessworkflow.fluent.spec.EventFilterBuilder;
4242
import io.serverlessworkflow.fluent.spec.OAuth2AuthenticationPolicyBuilder;
43-
import io.serverlessworkflow.fluent.spec.OIDCBuilder.OAuth2AuthenticationPropertiesEndpointsBuilder;
43+
import io.serverlessworkflow.fluent.spec.OAuth2AuthenticationPolicyBuilder.OAuth2AuthenticationPropertiesEndpointsBuilder;
4444
import io.serverlessworkflow.fluent.spec.ScheduleBuilder;
4545
import io.serverlessworkflow.fluent.spec.TimeoutBuilder;
4646
import io.serverlessworkflow.fluent.spec.WorkflowTaskBuilder;

fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/OAuth2AuthenticationPolicyBuilder.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import io.serverlessworkflow.api.types.OAuth2AuthenticationPolicy;
1919
import io.serverlessworkflow.api.types.OAuth2AuthenticationPolicyConfiguration;
20+
import io.serverlessworkflow.api.types.OAuth2AuthenticationPropertiesEndpoints;
2021
import java.util.function.Consumer;
2122

2223
public final class OAuth2AuthenticationPolicyBuilder
@@ -49,4 +50,31 @@ public OAuth2AuthenticationPolicy build() {
4950
policy.setOauth2(configuration);
5051
return policy;
5152
}
53+
54+
public static final class OAuth2AuthenticationPropertiesEndpointsBuilder {
55+
private final OAuth2AuthenticationPropertiesEndpoints endpoints;
56+
57+
OAuth2AuthenticationPropertiesEndpointsBuilder() {
58+
endpoints = new OAuth2AuthenticationPropertiesEndpoints();
59+
}
60+
61+
public OAuth2AuthenticationPropertiesEndpointsBuilder token(String token) {
62+
this.endpoints.setToken(token);
63+
return this;
64+
}
65+
66+
public OAuth2AuthenticationPropertiesEndpointsBuilder revocation(String revocation) {
67+
this.endpoints.setRevocation(revocation);
68+
return this;
69+
}
70+
71+
public OAuth2AuthenticationPropertiesEndpointsBuilder introspection(String introspection) {
72+
this.endpoints.setIntrospection(introspection);
73+
return this;
74+
}
75+
76+
public OAuth2AuthenticationPropertiesEndpoints build() {
77+
return this.endpoints;
78+
}
79+
}
5280
}

fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/OIDCBuilder.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import io.serverlessworkflow.api.types.AuthenticationPolicy;
1919
import io.serverlessworkflow.api.types.OAuth2AuthenticationData;
2020
import io.serverlessworkflow.api.types.OAuth2AuthenticationDataClient;
21-
import io.serverlessworkflow.api.types.OAuth2AuthenticationPropertiesEndpoints;
2221
import io.serverlessworkflow.api.types.OAuth2ConnectAuthenticationProperties;
2322
import io.serverlessworkflow.api.types.OAuth2TokenDefinition;
2423
import io.serverlessworkflow.api.types.OAuth2TokenRequest;
@@ -168,31 +167,4 @@ public OAuth2AuthenticationDataClient build() {
168167
return this.client;
169168
}
170169
}
171-
172-
public static final class OAuth2AuthenticationPropertiesEndpointsBuilder {
173-
private final OAuth2AuthenticationPropertiesEndpoints endpoints;
174-
175-
OAuth2AuthenticationPropertiesEndpointsBuilder() {
176-
endpoints = new OAuth2AuthenticationPropertiesEndpoints();
177-
}
178-
179-
public OAuth2AuthenticationPropertiesEndpointsBuilder token(String token) {
180-
this.endpoints.setToken(token);
181-
return this;
182-
}
183-
184-
public OAuth2AuthenticationPropertiesEndpointsBuilder revocation(String revocation) {
185-
this.endpoints.setRevocation(revocation);
186-
return this;
187-
}
188-
189-
public OAuth2AuthenticationPropertiesEndpointsBuilder introspection(String introspection) {
190-
this.endpoints.setIntrospection(introspection);
191-
return this;
192-
}
193-
194-
public OAuth2AuthenticationPropertiesEndpoints build() {
195-
return this.endpoints;
196-
}
197-
}
198170
}

fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/dsl/DSL.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import io.serverlessworkflow.fluent.spec.EventFilterBuilder;
2323
import io.serverlessworkflow.fluent.spec.ForkTaskBuilder;
2424
import io.serverlessworkflow.fluent.spec.OAuth2AuthenticationPolicyBuilder;
25-
import io.serverlessworkflow.fluent.spec.OIDCBuilder.OAuth2AuthenticationPropertiesEndpointsBuilder;
25+
import io.serverlessworkflow.fluent.spec.OAuth2AuthenticationPolicyBuilder.OAuth2AuthenticationPropertiesEndpointsBuilder;
2626
import io.serverlessworkflow.fluent.spec.ScheduleBuilder;
2727
import io.serverlessworkflow.fluent.spec.TaskItemListBuilder;
2828
import io.serverlessworkflow.fluent.spec.TimeoutBuilder;
@@ -499,7 +499,7 @@ public static AuthenticationConfigurer oauth2(String secret) {
499499
* e -> e.token("/custom/token"));
500500
* }</pre>
501501
*
502-
* @param authority OAuth2 authority/issuer URL
502+
* @param authority OAuth2 authority URL (the authorization server base URL)
503503
* @param grant OAuth2 grant type
504504
* @param clientId client identifier
505505
* @param clientSecret client secret

0 commit comments

Comments
 (0)