Commit ee27ce4
fix(iv): expose new public methods on OneSignal facade + log hygiene
Three review-driven fixes on the IV public-API surface:
1. OneSignal.kt: add @JvmStatic wrappers for updateUserJwt,
addUserJwtInvalidatedListener, removeUserJwtInvalidatedListener, and
updateUserJwtSuspend. Without these, the four new IOneSignal methods
were unreachable from app code (the OneSignal object is the documented
Java/Kotlin entry point and "implements IOneSignal in spirit"). Mirrors
the convention from reference branch #2599.
2. OneSignalImp.kt: mask jwtBearerToken in login()/loginSuspend() DEBUG
logs (...${jwtBearerToken?.takeLast(8)}). Pre-PR the parameter was a
no-op (LoginHelper had a TODO) so the leak was theoretical; this PR
wires the token through to JwtTokenStore.putJwt, so a live bearer
credential now flows through Logging.log at DEBUG. updateUserJwt
already masks; mirror that.
3. UserManager.kt: restore Logging.warn(msg, ex) form on the two new
runCatching.onFailure handlers in fireJwtInvalidated and
addJwtInvalidatedListener. Interpolating ${ex.message} drops the
stack trace; Logging.warn already accepts a Throwable second arg
that propagates through to log listeners and Otel — same pattern
restored in JwtTokenStore via e76fb60.
Also refreshes detekt baseline for the new MagicNumber (takeLast(8)),
ConstructorParameterNaming (_jwtTokenStore on UserManager), TooManyFunctions
(UserManager now also implements IJwtUpdateListener), and UseCheckOrError
on the 4 new IllegalStateException throws.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent cbb01af commit ee27ce4
4 files changed
Lines changed: 60 additions & 8 deletions
File tree
- OneSignalSDK
- detekt
- onesignal/core/src/main/java/com/onesignal
- internal
- user/internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
176 | | - | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| |||
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | | - | |
| 416 | + | |
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
| |||
457 | 458 | | |
458 | 459 | | |
459 | 460 | | |
460 | | - | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
630 | 629 | | |
631 | 630 | | |
632 | 631 | | |
633 | 632 | | |
| 633 | + | |
| 634 | + | |
634 | 635 | | |
635 | 636 | | |
| 637 | + | |
| 638 | + | |
636 | 639 | | |
637 | 640 | | |
638 | 641 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
346 | 380 | | |
347 | 381 | | |
348 | 382 | | |
| |||
405 | 439 | | |
406 | 440 | | |
407 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
408 | 457 | | |
409 | 458 | | |
410 | 459 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
706 | | - | |
| 706 | + | |
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
0 commit comments