public static Optional<Long> getOidcMaxAgeFromAuthorizationRequest(final WebContext context) {
        return FunctionUtils.doUnchecked(() -> {
            val builderContext = new URIBuilder(context.getFullRequestURL());
            return builderContext.getQueryParams()
                .stream()
                .filter(p -> OidcConstants.MAX_AGE.equals(p.getName()))
                .map(p -> Optional.of(p.getValue()))
                .findFirst()
                .orElseGet(() -> context.getRequestParameter(OidcConstants.MAX_AGE))
                .map(param -> {
                    val maxAge = NumberUtils.toLong(param, -1);
                    return Optional.of(maxAge);
                })
                .orElseGet(Optional::empty);
        });
    }
Gets oidc max age from authorization request.

@param context the context
@return the oidc max age from authorization request
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/util/OidcRequestSupport.java