Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop expiresIn() from OidcSession, deprecated since 2.12 #45770

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@ public interface OidcSession {
*/
String getTenantId();

/**
* Return an {@linkplain:Instant} indicating how long will it take for the current session to expire.
*
* @deprecated This method shouldn't be used as it provides an instant corresponding to 1970-01-01T0:0:0Z plus the duration
* of the validity of the token, which is impractical. Please use either {@link #expiresAt()} or
* {@link #validFor()} depending on your requirements. This method will be removed in a later version of
* Quarkus.
*
* @return Instant
*/
@Deprecated(forRemoval = true, since = "2.12.0")
Instant expiresIn();

/**
* Return an {@linkplain Instant} representing the current session's expiration time.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ public Uni<Void> apply(OidcTenantConfig oidcConfig) {

}

@Override
public Instant expiresIn() {
final long nowSecs = System.currentTimeMillis() / 1000;
return Instant.ofEpochSecond(idToken.getExpirationTime() - nowSecs);
}

@Override
public Instant expiresAt() {
return Instant.ofEpochSecond(idToken.getExpirationTime());
Expand Down
Loading