Skip to content

Commit 3bfe185

Browse files
committed
Remove dead code
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
1 parent d0327cb commit 3bfe185

4 files changed

Lines changed: 10 additions & 32 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ build/
3232
.vscode/
3333

3434
# Bob-Shell
35-
.bob/notes/
35+
.bob/notes/
36+
37+
38+
impl/test/**.db

impl/core/src/main/java/io/serverlessworkflow/impl/auth/HttpRequestInfo.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,5 @@ public record HttpRequestInfo(
2323
Map<String, WorkflowValueResolver<String>> headers,
2424
Map<String, WorkflowValueResolver<String>> queryParams,
2525
WorkflowValueResolver<URI> uri,
26-
WorkflowValueResolver<URI> revocationUri,
27-
WorkflowValueResolver<URI> introspectionUri,
2826
String grantType,
2927
String contentType) {}

impl/core/src/main/java/io/serverlessworkflow/impl/auth/HttpRequestInfoBuilder.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ class HttpRequestInfoBuilder {
3232

3333
private WorkflowValueResolver<URI> uri;
3434

35-
private WorkflowValueResolver<URI> revocationUri;
36-
37-
private WorkflowValueResolver<URI> introspectionUri;
38-
3935
private String grantType;
4036

4137
private String contentType;
@@ -70,16 +66,6 @@ HttpRequestInfoBuilder withUri(WorkflowValueResolver<URI> uri) {
7066
return this;
7167
}
7268

73-
HttpRequestInfoBuilder withRevocationUri(WorkflowValueResolver<URI> revocationUri) {
74-
this.revocationUri = revocationUri;
75-
return this;
76-
}
77-
78-
HttpRequestInfoBuilder withIntrospectionUri(WorkflowValueResolver<URI> introspectionUri) {
79-
this.introspectionUri = introspectionUri;
80-
return this;
81-
}
82-
8369
HttpRequestInfoBuilder withContentType(OAuth2TokenRequest oAuth2TokenRequest) {
8470
if (oAuth2TokenRequest != null) {
8571
this.contentType = oAuth2TokenRequest.getEncoding().value();
@@ -105,7 +91,6 @@ HttpRequestInfo build() {
10591
if (contentType == null) {
10692
contentType = APPLICATION_X_WWW_FORM_URLENCODED.value();
10793
}
108-
return new HttpRequestInfo(
109-
headers, queryParams, uri, revocationUri, introspectionUri, grantType, contentType);
94+
return new HttpRequestInfo(headers, queryParams, uri, grantType, contentType);
11095
}
11196
}

impl/core/src/main/java/io/serverlessworkflow/impl/auth/OAuthRequestBuilder.java

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
class OAuthRequestBuilder
3030
extends AbstractAuthRequestBuilder<OAuth2ConnectAuthenticationProperties> {
3131

32-
private static String DEFAULT_TOKEN_PATH = "oauth2/token";
33-
private static String DEFAULT_REVOCATION_PATH = "oauth2/revoke";
34-
private static String DEFAULT_INTROSPECTION_PATH = "oauth2/introspect";
32+
private static final String DEFAULT_TOKEN_PATH = "oauth2/token";
33+
private static final String DEFAULT_REVOCATION_PATH = "oauth2/revoke";
34+
private static final String DEFAULT_INTROSPECTION_PATH = "oauth2/introspect";
3535

3636
public OAuthRequestBuilder(WorkflowApplication application) {
3737
super(application);
@@ -45,23 +45,15 @@ protected void authenticationURI(OAuth2ConnectAuthenticationProperties authentic
4545
String token = endpoints != null ? endpoints.getToken() : null;
4646
String revocation = endpoints != null ? endpoints.getRevocation() : null;
4747
String introspection = endpoints != null ? endpoints.getIntrospection() : null;
48-
requestBuilder
49-
.withUri(endpointResolver(uri, endpointPath(token, DEFAULT_TOKEN_PATH)))
50-
.withRevocationUri(endpointResolver(uri, endpointPath(revocation, DEFAULT_REVOCATION_PATH)))
51-
.withIntrospectionUri(
52-
endpointResolver(uri, endpointPath(introspection, DEFAULT_INTROSPECTION_PATH)));
48+
requestBuilder.withUri(endpointResolver(uri, endpointPath(token, DEFAULT_TOKEN_PATH)));
5349
}
5450

5551
@Override
5652
protected void authenticationURI(Map<String, Object> secret) {
5753
URI authority = URI.create((String) secret.get(AUTHORITY));
5854
Map<?, ?> endpoints =
5955
secret.get("endpoints") instanceof Map<?, ?> raw ? (Map<?, ?>) raw : Map.of();
60-
requestBuilder
61-
.withUri(staticUri(authority, endpoints, "token", DEFAULT_TOKEN_PATH))
62-
.withRevocationUri(staticUri(authority, endpoints, "revocation", DEFAULT_REVOCATION_PATH))
63-
.withIntrospectionUri(
64-
staticUri(authority, endpoints, "introspection", DEFAULT_INTROSPECTION_PATH));
56+
requestBuilder.withUri(staticUri(authority, endpoints, "token", DEFAULT_TOKEN_PATH));
6557
}
6658

6759
private static String endpointPath(String path, String defaultPath) {

0 commit comments

Comments
 (0)