Skip to content

Conversation

@AramMutluWork
Copy link

The expiration time of the metadata defines the validUntil until attribute in the metadata of Engineblock. By default this a constant in the code set to 86.400 seconds (24 hours).

At the request of one of the connected Service Providers, we want to increase this value to 1,814,400 seconds (21 days). If something goes wrong with the automatic reading of our metadata, they will have more time to fix this error before users experience login problems.

To avoid having to set this up again with every release, we want to make this configurable, I left the default at 24 hours as before.

Copy link
Member

@MKodde MKodde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice and useful new contribution!

I see a lot of nice things, but looking at this critically, I have some suggestion/questions:

  1. Now that the exp time is no longer hard coded; would we not need some validation/verification if a correct value is configured? What happens with negative values, floating points, string values,... This validation does not need to be very comprehensive, and by looking at your type definition, the application only allows for integer values. But that can still be a negative value. Maybe check for that in the MetadataRenderer constructor?
  2. I'd love to see the MetaDataRendererTest be extended with a couple of additional tests to verify that the expected expiration time matches with the one configured

Comment on lines +348 to +349
$addRequestedAttributes,
86400
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from fixing the test by passing the new parameter, it might be very useful to add a couple of tests that verify the expiration time ends up correctly in the metadata?

@baszoetekouw baszoetekouw added this to the 7.1.0 milestone Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants