Skip to content

Revert "fix(oauth): naver oauth token revocation에서 인코딩으로 인한 에러 수정"#276

Merged
huhdy32 merged 1 commit intodevelopfrom
revert-275-fix/oauth
Nov 14, 2025
Merged

Revert "fix(oauth): naver oauth token revocation에서 인코딩으로 인한 에러 수정"#276
huhdy32 merged 1 commit intodevelopfrom
revert-275-fix/oauth

Conversation

@huhdy32
Copy link
Collaborator

@huhdy32 huhdy32 commented Nov 14, 2025

Reverts #275

Summary by CodeRabbit

  • Refactor

    • Cleaned up unused imports in the authentication module.
    • Optimized OAuth token handling in the revocation flow.
  • Tests

    • Removed deprecated URI encoding test.

@huhdy32 huhdy32 self-assigned this Nov 14, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Walkthrough

Removed URL-encoding from Naver OAuth revoke flow's access_token parameter by replacing UriUtils.encode() with raw token value. Deleted unused imports and corresponding test utilities for the removed encoding logic.

Changes

Cohort / File(s) Summary
OAuth revoke flow encoding simplification
domain/mathrank-auth-domain/src/main/java/kr/co/mathrank/domain/auth/client/NaverOAuthClient.java
Removed unused imports (Charset, StandardCharsets, UriUtils) and changed revoke flow to use raw token.access_token() instead of UriUtils.encode(..., UTF_8)
Test cleanup
domain/mathrank-auth-domain/src/test/java/kr/co/mathrank/domain/auth/util/UriUtilEncodeTest.java
Deleted test file containing plus_문자_인코딩_테스트 that validated UriUtils encoding/decoding behavior

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward removal of URL-encoding logic with no complex behavioral changes
  • Verify that raw token values are acceptable to Naver OAuth API without encoding
  • Confirm test deletion aligns with removed UriUtils dependency

Possibly related PRs

Poem

🐰 No more twists and turns for tokens in flight,
A rabbit hops onward, encoding set right,
Raw and pristine, the access codes go,
Tests bundled away, simplicity's glow! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly indicates this PR reverts a previous OAuth encoding fix, which aligns with the file changes removing URL-encoding and the test deletion.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-275-fix/oauth

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 996405a and 83e8d7f.

📒 Files selected for processing (2)
  • domain/mathrank-auth-domain/src/main/java/kr/co/mathrank/domain/auth/client/NaverOAuthClient.java (1 hunks)
  • domain/mathrank-auth-domain/src/test/java/kr/co/mathrank/domain/auth/util/UriUtilEncodeTest.java (0 hunks)
💤 Files with no reviewable changes (1)
  • domain/mathrank-auth-domain/src/test/java/kr/co/mathrank/domain/auth/util/UriUtilEncodeTest.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (1)
domain/mathrank-auth-domain/src/main/java/kr/co/mathrank/domain/auth/client/NaverOAuthClient.java (1)

67-67: I need to verify two things: the presence of test files and Spring's UriBuilder encoding behavior.

Now let me check the actual NaverOAuthClient implementation to verify the Spring RestClient version and whether .encode() is called:

I need to examine the actual NaverOAuthClient implementation to verify the review comment's claims. Let me search for test files and the actual revoke method:

Based on my verification, I've identified critical gaps in the original review comment that prevent me from definitively approving this revert. Here's what I found:

Verification Results:

  1. Spring UriBuilder Encoding: Spring's UriBuilder.queryParam() only encodes characters that are illegal in a query parameter name or value such as "=" or "&". Importantly, "+" is not encoded because it's treated as a valid RFC 3986 character. This means if Naver access tokens contain "+" characters, they would not be automatically encoded by Spring's queryParam().

  2. No Test Files Found: The shell script search returned NO test files specifically testing NaverOAuthClient or its revoke() functionality. The only mention was of a deleted UriUtilEncodeTest.java from PR fix(oauth): naver oauth token revocation에서 인코딩으로 인한 에러 수정 #275.

  3. Missing Implementation Context: Without seeing the full NaverOAuthClient implementation and Naver's API requirements, I cannot confirm whether:

The core issue: The original review comment states that PR #275 introduced a "double-encoding bug," but this is unverified. Manual encoding followed by Spring's selective encoding would only cause double-encoding for illegal characters (=, &), not for the entire token.

Recommendation: The review comment's approval is premature. This requires verification with actual Naver OAuth API specifications and integration testing.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @huhdy32, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a full revert of a previous change (PR #275) that aimed to address an encoding error during Naver OAuth token revocation. The original fix involved explicitly URI-encoding the access_token parameter, which this revert indicates was either incorrect or introduced new issues. By rolling back this modification, the access_token will no longer be subjected to explicit URI encoding when communicated to the Naver revocation endpoint, simplifying the process and potentially resolving unforeseen complications.

Highlights

  • Revert of URI Encoding: The pull request reverts the application of URI encoding to the Naver OAuth access_token parameter during the token revocation process.
  • Dependency Removal: Imports for java.nio.charset.Charset, java.nio.charset.StandardCharsets, and org.springframework.web.util.UriUtils have been removed from NaverOAuthClient.java.
  • Test File Deletion: The test file UriUtilEncodeTest.java, which likely validated the URI encoding behavior, has been removed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@huhdy32 huhdy32 enabled auto-merge (squash) November 14, 2025 05:05
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request reverts a previous change that introduced manual URL encoding for the access token during Naver OAuth token revocation. The revert is a good decision, as it correctly relies on the Spring RestClient framework to handle URL encoding of query parameters. This avoids potential double-encoding issues and adheres to best practices. The removal of the associated test file, which contained a flawed assertion, is also appropriate. The changes are correct and improve the code's robustness.

@huhdy32 huhdy32 merged commit fa6868e into develop Nov 14, 2025
2 checks passed
@huhdy32 huhdy32 deleted the revert-275-fix/oauth branch November 14, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant