@ SneakyThrows public static Optional < Long > getOidcMaxAgeFromAuthorizationRequest ( final WebContext context ) { val builderContext = new URIBuilder ( context . getFullRequestURL ( ) ) ; val parameter = builderContext . getQueryParams ( ) . stream ( ) . filter ( p -> OidcConstants . MAX_AGE . equals ( p . getName ( ) ) ) . findFirst ( ) ; if ( parameter . isPresent ( ) ) { val maxAge = NumberUtils . toLong ( parameter . get ( ) . getValue ( ) , - 1 ) ; return Optional . of ( maxAge ) ; } return Optional . empty ( ) ; }
Gets oidc max age from authorization request .