-
Notifications
You must be signed in to change notification settings - Fork 108
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
[ES-2250] preferring consent_expire_in_mins field over accessTokenExpireSeconds/idTokenExpireSeconds #1219
base: develop
Are you sure you want to change the base?
Conversation
… and idTokenExpireSeconds configuration Signed-off-by: Sachin Rana <sacrana324@gmail.com>
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
TokenResponse tokenResponse = getTokenResponse(transaction, isTransactionVCScoped); | ||
Optional<Integer> consentExpireSeconds = Optional.empty(); | ||
JsonNode additionalConfig = clientDetailDto.getAdditionalConfig(); | ||
if(additionalConfig != null && additionalConfig.get("consent_expire_in_mins") != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in a recent PR, We have added a method in clientDetailDTo to fetch the value of a particular additionalConfig and return the default value if the entry is not present. Can we use the same method here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I will check that
Optional<Integer> consentExpireSeconds = Optional.empty(); | ||
JsonNode additionalConfig = clientDetailDto.getAdditionalConfig(); | ||
if(additionalConfig != null && additionalConfig.get("consent_expire_in_mins") != null) { | ||
consentExpireSeconds = Optional.of(additionalConfig.get("consent_expire_in_mins").intValue()*60); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a constant for "consent_expire_in_mins" instead of defining the string everywhere.
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
If consent_expire_in_mins is provided in additional_config during client creation it will override the accessTokenExpireSecods and idtokenExpireSeconds configuration.