OidcUserInfo builder shoud accept Instant for the updateAt method

Aperta Adatta ai principianti
#20,013 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@KaranCodez ci sta già lavorando.

Dal 2/11/2026.

  • #20020 di @KaranCodez — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Inizia dal metodo updatedAt del builder OidcUserInfo, che attualmente accetta una String, e verifica come viene memorizzato il claim updated_at. Aggiungi un overload che accetta un Instant e lo memorizza come secondi epoch, che la specifica richiede come numero JSON. Controlla il workaround esistente claim("updated_at", ...) nell'issue per l'output atteso. Il lavoro è completo quando un test costruisce le informazioni utente da un Instant e verifica che il claim updated_at sia il timestamp Unix corrispondente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

status: waiting-for-triage type: bug

Describe the bug
This is the definition of the updated_at claim from the spec:

Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time.

Currently the updatedAt builder method accepts a String. The rendered claim in this case violates the spec.

To Reproduce

var info = OidcUserInfo.builder()
             .updatedAt( "not a valid date")
             .build();        

Expected behavior
The method should accept an Instant object and render as the unix timestamp corresponding to the value.

For now, the workaround is to use claim("updated_at", Instant.now().getEphochSecond())

Lingua principale
Java
Stelle
9.7k
Fork
6.4k
Merge medio
1g 18h
PR unite (30g)
37

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di spring-projects/spring-security

Tutte le issue di spring-projects/spring-security

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.