Skip to content

Commit ca017b9

Browse files
authored
Merge pull request #12 from FIWARE/fix/it-and-pom
fix(it): minor test fixes and updates in pom.xml
2 parents 570fec4 + 972bc7b commit ca017b9

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

deploy/helmfile.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ releases:
6262
- name: did-helper
6363
namespace: keycloak
6464
chart: ./aux-charts/did-helper
65-
version: 0.0.1
6665
labels:
6766
deploy: infra
6867
needs:
@@ -73,7 +72,6 @@ releases:
7372
- name: vc-authentication
7473
namespace: vc-authentication
7574
chart: ../charts/vc-authentication
76-
version: 0.0.1
7775
labels:
7876
deploy: vc-authentication
7977
needs:

it/pom.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>org.fiware.vcAuthentication</groupId>
7+
<groupId>org.fiware.dataspace</groupId>
88
<artifactId>it</artifactId>
99
<packaging>jar</packaging>
1010

1111
<parent>
12-
<artifactId>vcAuthentication</artifactId>
13-
<groupId>org.fiware</groupId>
12+
<artifactId>vc-authentication</artifactId>
13+
<groupId>org.fiware.dataspace</groupId>
1414
<version>0.0.1</version>
1515
</parent>
1616

@@ -24,12 +24,15 @@
2424
<version.org.awaitility>4.2.0</version.org.awaitility>
2525
<version.org.junit.bom>5.9.2</version.org.junit.bom>
2626
<version.io.cucumber>7.11.1</version.io.cucumber>
27-
<version.org.keycloak>24.0.4</version.org.keycloak>
27+
<version.org.keycloak>26.3.3</version.org.keycloak>
28+
<version.org.keycloak.keycloak-admin-client>26.0.7</version.org.keycloak.keycloak-admin-client>
2829
<version.org.openapitools.generator-maven-plugin>7.9.0</version.org.openapitools.generator-maven-plugin>
2930
<version.io.swagger>1.6.10</version.io.swagger>
3031
<version.javax.annotation>1.3.2</version.javax.annotation>
3132
<version.com.squareup.okhttp>4.12.0</version.com.squareup.okhttp>
3233
<version.com.github.multiformat.multi-base>v1.1.1</version.com.github.multiformat.multi-base>
34+
<version.com.auth0.java-jwt>3.8.3</version.com.auth0.java-jwt>
35+
<version.com.auth0.jwks-rsa>0.9.0</version.com.auth0.jwks-rsa>
3336
</properties>
3437

3538
<dependencyManagement>
@@ -106,12 +109,12 @@
106109
<dependency>
107110
<groupId>com.auth0</groupId>
108111
<artifactId>java-jwt</artifactId>
109-
<version>3.8.3</version>
112+
<version>${version.com.auth0.java-jwt}</version>
110113
</dependency>
111114
<dependency>
112115
<groupId>com.auth0</groupId>
113116
<artifactId>jwks-rsa</artifactId>
114-
<version>0.9.0</version>
117+
<version>${version.com.auth0.jwks-rsa}</version>
115118
</dependency>
116119
<dependency>
117120
<groupId>com.github.multiformats</groupId>
@@ -153,7 +156,7 @@
153156
<dependency>
154157
<groupId>org.keycloak</groupId>
155158
<artifactId>keycloak-admin-client</artifactId>
156-
<version>${version.org.keycloak}</version>
159+
<version>${version.org.keycloak.keycloak-admin-client}</version>
157160
<scope>test</scope>
158161
</dependency>
159162
<dependency>

it/src/test/java/org/fiware/vcauthentication/it/components/Wallet.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public class Wallet {
3939

4040
private static final OkHttpClient HTTP_CLIENT = TestUtils.OK_HTTP_CLIENT;
4141

42+
private static final String AUTHORIZATION_HEADER = "Authorization";
43+
private static final String BEARER_KEYWORD = "Bearer ";
44+
4245
private final KeyWrapper walletKey;
4346
private final String did;
4447

@@ -122,7 +125,7 @@ public OfferUri getCredentialOfferUri(String keycloakJwt, String issuerHost, Str
122125
Request request = new Request.Builder()
123126
.url(issuerHost + CREDENTIAL_OFFER_URI_PATH + "?credential_configuration_id=" + credentialConfigId)
124127
.get()
125-
.header("Authorization", "Bearer " + keycloakJwt)
128+
.header(AUTHORIZATION_HEADER, BEARER_KEYWORD + keycloakJwt)
126129
.build();
127130

128131
Response uriResponse = HTTP_CLIENT.newCall(request).execute();
@@ -138,7 +141,7 @@ public CredentialOffer getCredentialOffer(String keycloakJwt, OfferUri offerUri)
138141
Request uriRequest = new Request.Builder()
139142
.get()
140143
.url(offerUri.getIssuer() + offerUri.getNonce())
141-
.header("Authorization", "Bearer " + keycloakJwt)
144+
.header(AUTHORIZATION_HEADER, BEARER_KEYWORD + keycloakJwt)
142145
.build();
143146

144147
Response offerResponse = HTTP_CLIENT.newCall(uriRequest).execute();
@@ -187,7 +190,7 @@ private String requestOffer(String token, String credentialEndpoint, SupportedCo
187190
Request credentialHttpRequest = new Request.Builder()
188191
.post(credentialRequestBody)
189192
.url(credentialEndpoint)
190-
.header("Authorization", "Bearer " + token)
193+
.header(AUTHORIZATION_HEADER, BEARER_KEYWORD + token)
191194
.header("Content-Type", MediaType.APPLICATION_JSON)
192195
.build();
193196

it/src/test/java/org/fiware/vcauthentication/it/components/model/Format.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ public enum Format {
3939

4040
/**
4141
* SD-JWT-Credentials {@see https://drafts.oauth.net/oauth-sd-jwt-vc/draft-ietf-oauth-sd-jwt-vc.html}
42+
* NOTE: deprecated in favour of SD_JWT_DC (dc+sd-jwt)
4243
*/
43-
SD_JWT_VC("vc+sd-jwt");
44+
SD_JWT_VC("vc+sd-jwt"),
45+
46+
/**
47+
* New name for SD-JWT-Credentials {@see https://drafts.oauth.net/oauth-sd-jwt-vc/draft-ietf-oauth-sd-jwt-vc.html}
48+
*/
49+
SD_JWT_DC("dc+sd-jwt");
4450

4551
private String value;
4652

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>org.fiware</groupId>
8-
<artifactId>vcAuthentication</artifactId>
7+
<groupId>org.fiware.dataspace</groupId>
8+
<artifactId>vc-authentication</artifactId>
99
<version>0.0.1</version>
1010
<packaging>pom</packaging>
1111
<modules>

0 commit comments

Comments
 (0)