Commit Graph

81 Commits

Author SHA1 Message Date
Giancarlo Panichi efef4b9053 Update src/test/java/org/gcube/common/keycloak/TestKeycloakClient.java 2025-11-05 12:12:37 +01:00
Giancarlo Panichi 39f9a585eb Update src/test/java/org/gcube/common/keycloak/TestModelUtils.java 2025-11-05 12:12:03 +01:00
Giancarlo Panichi ddc2852c32 Update src/test/java/org/gcube/common/keycloak/TestModelUtils.java 2025-11-05 12:09:36 +01:00
Giancarlo Panichi 1da46d1645 Update src/test/java/org/gcube/common/keycloak/TestKeycloakClient.java 2025-11-05 12:08:31 +01:00
Giancarlo Panichi 7e7cf86e69 Update pom.xml 2025-11-05 11:34:55 +01:00
Giancarlo Panichi fbf1c5273e Update CHANGELOG.md 2025-11-05 11:27:03 +01:00
Giancarlo Panichi 3101d4dc3b Update pom.xml 2025-11-05 11:14:11 +01:00
Giancarlo Panichi 7079aef105 Update profile.xml 2025-11-05 11:07:18 +01:00
Giancarlo Panichi 80fffdd66d Update profile.xml 2025-11-05 11:07:00 +01:00
Giancarlo Panichi 4840fe0ef7 Upload files to "/" 2025-11-05 11:06:02 +01:00
Giancarlo Panichi 5fcf562d30 Update pom.xml 2025-11-05 11:05:18 +01:00
Alfredo Oliviero 4a9dc0915d fixed javadoc 2025-07-08 11:28:01 +02:00
Alfredo Oliviero 5abd51f245 missing import 2025-07-08 10:41:07 +02:00
Alfredo Oliviero 9a6e5e2839 license 2025-07-08 10:39:12 +02:00
Alfredo Oliviero 00b435382d code format 2025-07-08 10:39:12 +02:00
Mauro Mugnaini 027961bbac
Log info string moved from `gxJRS` to `gxHTTP` 2025-07-07 16:48:33 +02:00
Mauro Mugnaini 17ce79b94e Added method to test token with different exceptions in addition to the one that returns a boolean that shows if is valid or not 2024-10-24 16:09:48 +02:00
Mauro Mugnaini 27dc8718b8 Released version of the gcube `jjwt` lib is now used 2024-10-22 16:45:03 +02:00
Mauro Mugnaini 2dbeb5c6e8 Moved from `gxJRS` to `gxHTTP` and internal `jjwt` lib 2024-10-18 18:46:04 +02:00
Mauro Mugnaini 14e05d71de Added specific setting to use dynamic scope instead of the custom header when directly requesting a specific context for an OIDC token and related unit tests (#28084) 2024-09-27 13:08:27 +02:00
Mauro Mugnaini 0a1a739ec7 - Added support to add scopes in requests in client and constants for d4s-context dynamic scope. (#28084)
- Added tests to demonstrate dynamic scopes for clients and for users on both private and public clients (#28084)
2024-09-26 19:32:16 +02:00
Mauro Mugnaini 75810cd113 Prepared for `2.2.0-SNAPSHOT` also updating BOM 2024-09-26 19:32:09 +02:00
Mauro Mugnaini 45c52f1d56
Releasing version `2.1.0` 2024-05-07 16:56:05 +02:00
Mauro Mugnaini a4c5de4e9e
Implemented custom deserializer that uses `gcube-jackson-databind` and removes completely the dependency with `jjson-*` deserializers 2024-05-07 16:51:34 +02:00
Mauro Mugnaini e0b165c491
Releasing version `2.1.0` 2024-05-06 18:11:29 +02:00
Mauro Mugnaini 1cbfa034e7
Testing offline token exchange with exception only (scope without specific value) 2024-05-06 18:11:11 +02:00
Mauro Mugnaini 22013667d1
Token exchage for an offline token now raises an IllegalArgumetException if the original token not contains `offline_access` within its scopes, required by the `v24.0.2` version of the Keycloak 2024-05-06 18:10:26 +02:00
Mauro Mugnaini dfb35bad62
Added javadoc for token exchange methods and exchage for an offline token now raises an IllegalArgumetException if the original token not contains `offline_access` within its scopes, required by the `v24.0.2` version of the Keycloak 2024-05-06 18:09:40 +02:00
Mauro Mugnaini eabd708631
Temporary disabling exchange for offline token since with new keycloak original token should be issued with `offline` scope to work and has still to be inroduced the possibility to do it 2024-05-03 12:13:41 +02:00
Mauro Mugnaini 899cf13afd
Temporary disabling exchange for offline token since with new keycloak original token should be issued with `offline` scope to work and has still to be inroduced the possibility to do it 2024-05-03 12:10:07 +02:00
Mauro Mugnaini 49af6590f7
Fixed javadocs 2024-05-03 12:07:42 +02:00
Mauro Mugnaini ca0423cdf2
Changed to `runtime` `jjwt-impl` dependnecy and moved to `jjwt-gson` as `provided` seems to solve the issue #27377 2024-05-03 12:07:19 +02:00
Mauro Mugnaini 027803b7e9
Added also `jackson-core` and `jackson-annotations` to the exclusions of `jjwt-impl` dependency 2024-05-02 18:14:39 +02:00
Mauro Mugnaini 0dbf1c0c95
Added explicit declaration of `jackson-databind `2,)` to `provided`, also added to exclusions of `jjwt-impl` 2024-05-02 11:37:32 +02:00
Mauro Mugnaini 5938bf4af8
Replaced `auth0` lib with `jjwt` by `io.jsonwebtoken` that doesn't require jackson at runtime if not used 2024-04-30 20:13:30 +02:00
Mauro Mugnaini e339be5083
Added support to JWK endpoint and key sets retrieve to take info about configured key algorithms 2024-04-30 18:31:07 +02:00
Mauro Mugnaini 7d98fbaa16
Overloaded methods to disable token expiration, generalized public key generation providing key algorithm and added support of RS384 and RS512 signature algorithms, defaulting to RS256 if not specified 2024-04-30 18:29:21 +02:00
Mauro Mugnaini 8c009b9a8d
Renamed method `isSignatureValid()` to `isValid()` since it tests also other aspects (exipration, not before, etc...). 2024-04-30 12:55:04 +02:00
Mauro Mugnaini 23f387f832
Added JWT digital signature verification by using the RSA public key of the realm on server. Uses `java-jwt` library by Auth0 [#27340] 2024-04-30 11:48:22 +02:00
Mauro Mugnaini 726291ca55
Added custom base URL set via factory (not automatically working cross environments) [#27234]
Better tests for exchange-token features
2024-04-22 17:50:00 +02:00
Mauro Mugnaini 35c913db02
Added `token-exchange` support, also with `offline-token` scope, and methods to add extra headers during the OIDC token requests. 2024-04-19 17:26:40 +02:00
Mauro Mugnaini 86c3887e76 Release of the `v.2.0.0` 2023-07-21 12:45:18 +02:00
Mauro Mugnaini 52d70eda60 Added new `KeycloakClientHelper` class to perform token request for user in one shot and without the need to provide the `clientId` parameter (#25291). Only `context`, `username` and `password` are required. 2023-07-13 13:09:33 +02:00
Mauro Mugnaini 89c5cf04bd Revised code to avoid method invoked twice and double logging 2023-07-13 13:06:24 +02:00
Mauro Mugnaini d5ddbfd067 Added support of password grant flow (corresponding to the now deprecated OAuth2 flow: Resource Owner Password Credentials grant) also for specific context/audience by using the specific D4S mapper. (#25291) 2023-07-11 13:36:23 +02:00
Mauro Mugnaini a71f1725a7 The library now uses with `2.4.0-SNAPSHOT` version of the BOM and safe set `isExternalCall` to `true` with reflection to be compatible with both old and new `gxJRS` APIs 2023-07-10 15:46:48 +02:00
Mauro Mugnaini 00d07f99c6 Added changelog info 2023-03-23 18:39:22 +01:00
Mauro Mugnaini 5f3e02c6e4 Added support for the user of the D4S mapper that maps/shrink the `aud` to the value requested via `X-D4Science-Context` HTTP header 2023-03-23 18:27:24 +01:00
Mauro Mugnaini 168a1d4b35 Added predictive infrastructure URL support based on context (and on context and realm if the target realm is not the default one) and overloaded all methods that take the URL as argument with the context (#23655) 2022-07-15 18:19:35 +02:00
Luca Frosini 9577388a09 Removed uneeded dependency 2022-07-15 16:02:21 +02:00