Skip to content

Commit

Permalink
fix: pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Sep 18, 2024
1 parent 360b266 commit f3c022f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws I
String iss = InputParser.parseStringOrThrowError(input, "iss", false); // input validation
JsonObject bodyFromSDK = InputParser.parseJsonObjectOrThrowError(input, "inputBody", false);

JsonObject accessTokenUpdate = InputParser.parseJsonObjectOrThrowError(input, "access_token", true);
JsonObject idTokenUpdate = InputParser.parseJsonObjectOrThrowError(input, "id_token", true);

// useStaticKeyInput defaults to true, so we check if it has been explicitly set to false
Boolean useStaticKeyInput = InputParser.parseBooleanOrThrowError(input, "useStaticSigningKey", true);
boolean useDynamicKey = Boolean.FALSE.equals(useStaticKeyInput);
Expand Down Expand Up @@ -88,9 +91,6 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws I
AppIdentifier appIdentifier = getAppIdentifier(req);
Storage storage = enforcePublicTenantAndGetPublicTenantStorage(req);

JsonObject accessTokenUpdate = InputParser.parseJsonObjectOrThrowError(input, "access_token", true);
JsonObject idTokenUpdate = InputParser.parseJsonObjectOrThrowError(input, "id_token", true);

jsonBody = OAuth.transformTokens(super.main, appIdentifier, storage, jsonBody.getAsJsonObject(), iss, accessTokenUpdate, idTokenUpdate, useDynamicKey);

} catch (IOException | InvalidConfigException | TenantOrAppNotFoundException | BadPermissionException | StorageQueryException | InvalidKeyException | NoSuchAlgorithmException | InvalidKeySpecException | JWTCreationException | JWTException | StorageTransactionLogicException | UnsupportedJWTSigningAlgorithmException e) {
Expand Down

0 comments on commit f3c022f

Please sign in to comment.