Skip to content

Commit

Permalink
Injiweb 1203 handing wellknown caching issues (#577)
Browse files Browse the repository at this point in the history
* [INJIWEB-1203] Updating handling of wellknown APis failure in issuers endpoint

Signed-off-by: Gurpreet41082 <[email protected]>

* [INJIWEB-1203] Fixed test case

Signed-off-by: Gurpreet41082 <[email protected]>

* [INJIWEB-1203] Fixed the keys for the caching

Signed-off-by: Gurpreet41082 <[email protected]>

---------

Signed-off-by: Gurpreet41082 <[email protected]>
  • Loading branch information
Gurpreet41082 authored Feb 4, 2025
1 parent 66ae1ae commit 6a56262
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class AuthorizationServerServiceImpl implements AuthorizationServerServic
private ObjectMapper objectMapper;

@Override
@Cacheable(value = "authServerWellknown", key = "{#authorizationServerHostUrl}")
@Cacheable(value = "authServerWellknown", key = "#p0")
public AuthorizationServerWellKnownResponse getWellknown(String authorizationServerHostUrl) throws AuthorizationServerWellknownResponseException {
try {
String wellknownEndpoint = authorizationServerHostUrl + "/.well-known/oauth-authorization-server";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class IssuerWellknownServiceImpl implements IssuerWellknownService {


@Override
@Cacheable(value = "issuerWellknown", key = "{#credentialIssuerHost}")
@Cacheable(value = "issuerWellknown", key = "#p0")
public CredentialIssuerWellKnownResponse getWellknown(String credentialIssuerHost) throws ApiNotAccessibleException, IOException, InvalidWellknownResponseException {
try {
String wellknownEndpoint = credentialIssuerHost + "/.well-known/openid-credential-issuer";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public IssuersDTO getAllIssuers() throws ApiNotAccessibleException, Authorizatio
}

@Override
@Cacheable(value = "credentialIssuerConfig", key = "{#issuerId}")
@Cacheable(value = "credentialIssuerConfig", key = "#p0")
public CredentialIssuerConfigurationResponse getIssuerConfiguration(String issuerId) throws ApiNotAccessibleException, IOException, AuthorizationServerWellknownResponseException, InvalidWellknownResponseException {
CredentialIssuerWellKnownResponse credentialIssuerWellKnownResponse = issuerWellknownService.getWellknown(getIssuerDetails(issuerId).getCredential_issuer_host());
AuthorizationServerWellKnownResponse authorizationServerWellKnownResponse = authorizationServerService.getWellknown(credentialIssuerWellKnownResponse.getAuthorizationServers().get(0));
Expand Down

0 comments on commit 6a56262

Please sign in to comment.