Skip to content

Commit

Permalink
replace deprecated method with getAppTid
Browse files Browse the repository at this point in the history
  • Loading branch information
liga-oz committed Jul 21, 2023
1 parent 6e1a7b9 commit 3fd79e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ void disableTenantIdCheck() {
public ValidationResult validate(Token token) {
String jwksUri;
String keyId;
String zoneIdForTokenKeys = null;
String appTidForTokenKeys = null;

if (Service.IAS == configuration.getService()) {
zoneIdForTokenKeys = token.getZoneId();
appTidForTokenKeys = token.getAppTid();
if (isTenantIdCheckEnabled && !token.getIssuer().equals("" + configuration.getUrl())
&& zoneIdForTokenKeys == null) {
&& appTidForTokenKeys == null) {
return createInvalid("Error occurred during signature validation: OIDC token must provide app_tid.");
}
}
Expand All @@ -96,7 +96,7 @@ public ValidationResult validate(Token token) {
keyId,
jwksUri,
fallbackPublicKey,
zoneIdForTokenKeys);
appTidForTokenKeys);
} catch (OAuth2ServiceException | IllegalArgumentException e) {
return createInvalid("Error occurred during jwks uri determination: {}", e.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public OAuth2TokenKeyServiceWithCache withTokenKeyService(OAuth2TokenKeyService
* the Token Key Uri (jwks) of the Access Token (can be tenant
* specific).
* @param appTid
* the tenant identifier of the tenant
* the unique identifier of the tenant
* @return a PublicKey
* @throws OAuth2ServiceException
* in case the call to the jwks endpoint of the identity service
Expand Down Expand Up @@ -147,7 +147,7 @@ public PublicKey getPublicKey(JwtSignatureAlgorithm keyAlgorithm, String keyId,
* the Token Key Uri (jwks) of the Access Token (can be tenant
* specific).
* @param appTid
* the tenant identifier of the tenant
* the unique identifier of the tenant
*
* @param clientId
* client id from the service configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface OAuth2TokenKeyService {
* @param tokenKeysEndpointUri
* the token endpoint URI (jku).
* @param tenantId
* the tenant id of the tenant. Obligatory parameter in context of
* the unique identifier of the tenant. Obligatory parameter in context of
* multi-tenant IAS applications to make sure that the tenant id
* belongs to the IAS tenant.
* @return list of JSON Web Token (JWT) keys as
Expand All @@ -37,7 +37,7 @@ public interface OAuth2TokenKeyService {
* @param tokenKeysEndpointUri
* the token endpoint URI (jku).
* @param tenantId
* the tenant id of the tenant. Obligatory parameter in context of
* the unique identifier of the tenant. Obligatory parameter in context of
* multi-tenant IAS applications to make sure that the tenant id
* belongs to the IAS tenant.
* @param clientId
Expand Down

0 comments on commit 3fd79e7

Please sign in to comment.