[java-oidc-common] 01/03: Removed special handling related to the removed 'refreshTokenLifetime' option
Henri Mikkonen
henri.mikkonen at iki.fi
Fri Sep 8 10:56:57 UTC 2023
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-oidc-common.
View the commit online:
http://git.shibboleth.net/view/?p=java-oidc-common.git;a=commit;h=349e383ed8a9d16ba26469161d34a40c638a4c29
commit 349e383ed8a9d16ba26469161d34a40c638a4c29
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Fri Sep 8 13:48:10 2023 +0300
Removed special handling related to the removed 'refreshTokenLifetime' option
---
.../config/impl/AbstractOIDCSSOConfiguration.java | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
index 3b3fcc6..20e89da 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
@@ -39,8 +39,6 @@ import net.shibboleth.shared.annotation.constraint.NotLive;
import net.shibboleth.shared.annotation.constraint.Positive;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.logic.FunctionSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport.ObjectType;
import net.shibboleth.shared.primitive.StringSupport;
/**
@@ -73,9 +71,6 @@ public abstract class AbstractOIDCSSOConfiguration extends AbstractOAuth2FlowAwa
/** Lookup function to supply access token lifetime. */
@Nonnull private Function<ProfileRequestContext,Duration> accessTokenLifetimeLookupStrategy;
- /** Lookup function to supply refresh token lifetime. */
- @Nonnull private Function<ProfileRequestContext,Duration> refreshTokenLifetimeLookupStrategy;
-
/** Lookup function to supply refresh token timeout. */
@Nonnull private Function<ProfileRequestContext,Duration> refreshTokenTimeoutLookupStrategy;
@@ -115,7 +110,6 @@ public abstract class AbstractOIDCSSOConfiguration extends AbstractOAuth2FlowAwa
idTokenLifetimeLookupStrategy = FunctionSupport.constant(Duration.ofHours(1));
accessTokenTypeLookupStrategy = FunctionSupport.constant(null);
accessTokenLifetimeLookupStrategy = FunctionSupport.constant(Duration.ofMinutes(10));
- refreshTokenLifetimeLookupStrategy = FunctionSupport.constant(Duration.ofHours(2));
refreshTokenTimeoutLookupStrategy = FunctionSupport.constant(Duration.ofHours(2));
refreshTokenChainLifetimeLookupStrategy = FunctionSupport.constant(Duration.ofHours(2));
@@ -338,17 +332,6 @@ public abstract class AbstractOIDCSSOConfiguration extends AbstractOAuth2FlowAwa
@Override
@Nonnull @Positive
public Duration getRefreshTokenTimeout(@Nullable final ProfileRequestContext profileRequestContext) {
- // the block starting from here can be removed once refreshTokenLifetime is removed
- final Duration deprecatedLifetime = refreshTokenLifetimeLookupStrategy.apply(profileRequestContext);
- if (!Duration.ofHours(2).equals(deprecatedLifetime)) {
- DeprecationSupport.warnOnce(ObjectType.METHOD, "setRefreshTokenLifetimeLookupStrategy",
- getClass().getCanonicalName(), "setRefreshTokenTimeoutLookupStrategy");
- Constraint.isTrue(deprecatedLifetime != null && !deprecatedLifetime.isZero() &&
- !deprecatedLifetime.isNegative(), "Refresh token lifetime must be greater than 0");
- return deprecatedLifetime;
- }
- // the block ends
-
final Duration timeout = refreshTokenTimeoutLookupStrategy.apply(profileRequestContext);
Constraint.isTrue(timeout != null && !timeout.isZero() && !timeout.isNegative(),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list