spring-security icon indicating copy to clipboard operation
spring-security copied to clipboard

AuthenticatorTransport#values should return all values

Open jzheaux opened this issue 6 months ago • 3 comments

AuthenticatorTransport#values() omits SMART_CARD, even though it is a defined constant and is handled correctly in valueOf(String).

Before:

public static AuthenticatorTransport[] values() {
    return new AuthenticatorTransport[] { USB, NFC, BLE, HYBRID, INTERNAL };
}

After:

public static AuthenticatorTransport[] values() {
    return new AuthenticatorTransport[] { USB, NFC, BLE, SMART_CARD, HYBRID, INTERNAL };
}

jzheaux avatar May 28 '26 16:05 jzheaux

Hi, @jzheaux. Can I work on it?

therepanic avatar May 28 '26 16:05 therepanic

Hi, I'd like to work on this. Could it be assigned to me?

I've prepared a fix that adds the missing SMART_CARD constant to AuthenticatorTransport#values() (it is already a defined constant and handled by valueOf(String)), along with a regression test that reflectively verifies values() returns all declared constants. I'll open a PR shortly.

sathish256 avatar Jun 03 '26 19:06 sathish256

Apologies — I just noticed #19233 already addresses this. Please disregard my earlier offer; deferring to that PR.

sathish256 avatar Jun 03 '26 19:06 sathish256