Skip to content

Releases: cattomato-libs/Oah

v2.1.2

Choose a tag to compare

@catomat0 catomat0 released this 15 Sep 06:33

Fixed

  • 파사드 빈 (OahOAuth / OahJwt / OahSignup) 이 등록되지 않던 심각한 버그 수정

Nested @Configuration 내부의 @ConditionalOnBean 이 outer @AutoConfiguration 클래스의 빈을 조건 평가 시점에 발견하지 못하는 Spring Boot 컨피그 파싱 타이밍 이슈로, v2.1.0 / v2.1.1 에서 세 파사드 빈이 모두 등록되지 않았습니다.

3개 파일에서 방어용 @ConditionalOnBean 제거 (OAuthAutoConfiguration, JwtAutoConfiguration, SignupTokenAutoConfiguration). 생성자 주입이 어차피 필수라 조건 없이도 명확한 실패 메시지가 발생합니다.

Migration

v2.1.0 / v2.1.1 사용자는 즉시 v2.1.2 로 업그레이드 필요. 사용 API 는 완전 동일.

```gradle
// JitPack
implementation 'com.github.catomat0:Oah:2.1.2'

// GitHub Packages
implementation 'com.github.catomat0:oauth-helper:2.1.2'
```

v2.1.1

Choose a tag to compare

@catomat0 catomat0 released this 15 Sep 05:50

Docs

  • README 를 JitPack 우선 설치 방식으로 재구성
  • CI/CD 시나리오별 세팅 가이드 추가 (개인/조직/외부 레포 모두 무인증 사용 가능)
  • GitHub Packages 사용법은 접힘 섹션으로 이동 (private 배포/캐시 최적화 필요 시)

v2.1.0

Choose a tag to compare

@catomat0 catomat0 released this 15 Sep 02:27

컨트롤러 주입 간소화 — 도메인 파사드 3개 추가.

Added

  • OahOAuth(state, authorize, login) — OAuth 3개 서비스 record 파사드
  • OahJwt(provider, refresh, cookie) — JWT 3개 서비스 record 파사드
  • OahSignup(provider, service, cookie) — Signup 3개 서비스 record 파사드

Highlights

컨트롤러에서 개별 서비스 9개 주입 → 파사드 3개 주입으로 감소:

// v2.1.0
public AuthController(OahOAuth oauth, OahJwt jwt, OahSignup signup, UserRepo repo) { ... }
// 사용: oauth.state().issue(...), jwt.provider().generateAccessToken(...), signup.cookie().write(...)

파사드는 내부 3개 빈이 모두 존재할 때만 자동 등록 (@ConditionalOnBean). Redis 미설정 등으로 일부 빈이 빠지면 파사드도 미등록 → 사용자는 개별 빈을 직접 주입.

Non-breaking

기존 개별 빈 (OahStateService, OahJwtProvider, ...) 도 그대로 자동 등록됨. v2.0.0 에서 개별 주입 방식으로 짠 코드는 아무 변경 없이 동작.

Migration (선택사항)

필요하면 IDE 로 필드 축약 리팩터. 안 해도 됨.

전체 변경사항은 CHANGELOG.md 참조.

v2.0.0

Choose a tag to compare

@catomat0 catomat0 released this 15 Sep 02:09

프로젝트 리브랜딩 + 전체 API 리네이밍 릴리즈 (Breaking change).

리브랜딩

  • 프로젝트명: spring_oauth_starter → Oauth-helper (약칭 OAH)
  • GitHub repo: catomat0/spring_oauth_starter → catomat0/Oah
  • Java 패키지: com.github.catomat0.spring_oauth_starter.* → com.github.catomat0.oauthhelper.*
  • Maven artifactId: spring_oauth_starter → oauth-helper

Breaking — 모든 public 클래스에 Oah prefix

31개 사용자-facing 클래스가 리네이밍됨. AutoConfiguration 내부 클래스는 그대로 유지.

  • OAuth 계열 (OAuth* → Oah*): OahProvider, OahLoginService, OahStateService, OahAuthorizeUrlBuilder, OahAuthorizeParams, OahProperties, OahException, OahErrorCode, OahUserInfo, OahTokenClient, OahUserInfoClient
  • DTO: OahTokenResponse, OahKakaoUserInfoResponse, OahGoogleUserInfoResponse
  • JWT (Jwt* → OahJwt*, RefreshToken* → OahRefreshToken*): 8개
  • Signup Token (SignupToken* → OahSignupToken*): 9개

Migration guide

build.gradle

// before
repositories { maven { url = uri('https://maven.pkg.github.com/catomat0/spring_oauth_starter') } }
dependencies { implementation 'com.github.catomat0:spring_oauth_starter:1.1.1' }

// after
repositories { maven { url = uri('https://maven.pkg.github.com/catomat0/Oah') } }
dependencies { implementation 'com.github.catomat0:oauth-helper:2.0.0' }

imports — IDE 의 rename refactor 로 일괄 처리 권장:

// before
import com.github.catomat0.spring_oauth_starter.jwt.JwtProvider;
// after
import com.github.catomat0.oauthhelper.jwt.OahJwtProvider;

자세한 rename 표는 CHANGELOG.md 참조.

이전 v1.x 사용자

GitHub 이 catomat0/spring_oauth_starter → catomat0/Oah 자동 redirect 유지 (수개월). 옛 좌표 v1.1.1 은 계속 다운로드 가능.

v1.1.1

Choose a tag to compare

@catomat0 catomat0 released this 15 Sep 01:33

예외 타입 일관성 정리 패치 릴리즈.

Changed

  • 남아있던 IllegalStateException 5곳을 라이브러리 전용 예외로 통일 — 사용자가 하나의 예외 타입만 catch 하면 됨.
    • JwtProperties.validate() (2곳) → JwtException(EXPIRATION_INVALID) / JwtException(REFRESH_COOKIE_INSECURE_SAMESITE)
    • OAuthProperties.validate() → OAuthException(STATE_TTL_INVALID)
    • OAuthProperties.Provider.requireField() → OAuthException(PROVIDER_INCOMPLETE)
    • OAuthProperties.Provider.requireHttps() → OAuthException(INSECURE_URI)

Added

  • 신규 에러 코드
    • JwtErrorCode: EXPIRATION_INVALID, REFRESH_COOKIE_INSECURE_SAMESITE
    • OAuthErrorCode: PROVIDER_INCOMPLETE, STATE_TTL_INVALID
  • README 배지 (Release / JavaDoc / License) + 상단 링크 라인.

Non-breaking — 기존 코드가 RuntimeException 으로 catch 하고 있었다면 그대로 동작.

전체 변경사항은 CHANGELOG.md 참조.

v1.1.0

Choose a tag to compare

@catomat0 catomat0 released this 15 Sep 01:22

Kakao/Google OAuth2 로그인 + JWT + Signup token 통합 스타터 v1.1.0.

Added

  • OAuth2 로그인 — Kakao/Google 콜백 code → access_token → userinfo 자동화 (OAuthLoginService)
  • CSRF state + PKCE (S256) — OAuthStateService 가 state 와 code_verifier/challenge 자동 생성/저장/검증
  • OAuthAuthorizeUrlBuilder — authorize URL 자동 조립 (state/PKCE/scope 포함)
  • JWT access/refresh — type=ACCESS/REFRESH 강제 구분, Redis RT:{userId} + GETDEL rotation
  • JwtAuthenticationFilter — Bearer → SecurityContext 자동 세팅 (Spring Security 있을 때만)
  • RefreshTokenCookieWriter — refresh HttpOnly 쿠키 헬퍼
  • Kakao/Google 엔드포인트 URI 하드코딩 디폴트 — client-id/secret/redirect-uri 만 세팅해도 동작
  • RestClient 타임아웃 프로퍼티화 — oauth.rest-client.connect-timeout-ms / read-timeout-ms
  • 에러 코드 enum — OAuthErrorCode / JwtErrorCode / SignupTokenErrorCode
  • Startup 검증 — HTTPS 강제, prefix 충돌 감지, Kakao/Google email 필수 강제 (EMAIL_MISSING)

Changed

  • 라이센스: MIT → Apache 2.0
  • 예외 타입: IllegalStateException → OAuthException / JwtException / SignupTokenException
  • 패키지: .oauth_signup_token.* → .spring_oauth_starter.signuptoken.*

Requirements

  • Spring Boot 3.3+
  • Java 17+
  • Redis 6.2+ (refresh/signup/state 저장)
  • (선택) spring-boot-starter-security — JwtAuthenticationFilter 자동 등록

전체 변경사항은 CHANGELOG.md 참조.

v1.0.0

Choose a tag to compare

@catomat0 catomat0 released this 15 Sep 00:43

Spring Boot용 소셜로그인 스타터 초기 릴리즈.

Features

  • OAuth2 login — Kakao/Google 콜백 처리 (OAuthLoginService.fetchUserInfo(provider, code))
  • JWT access/refresh — type 클레임으로 타입 강제 구분, 32byte secret fail-fast
  • Refresh token rotation — Redis RT:{userId} + GETDEL 기반 원자적 소비
  • Signup token — 온보딩 이탈 시 재개 (JWT + Redis + HttpOnly 쿠키)
  • AutoConfiguration — provider별 opt-in, Redis 미설정 시 명시적 WARN 로그

Requirements

  • Spring Boot 3.3+
  • Java 17+
  • Redis 6.2+ (refresh/signup token 사용 시)

자세한 설정/사용법은 README 참조.